Yes, this is what I expected exec to do, never return.

system does work like I told in my previous email:
this what I get (and notepad is actually launching):
ret=00000000, $?=0, $!=Bad file descriptor, $^E=

-----Original Message-----
From: $Bill Luebkert [mailto:[EMAIL PROTECTED] 
Sent: 21 mars 2006 19:27
To: Francis Paulin
Cc: [email protected]
Subject: Re: exec broken?

Francis Paulin wrote:

> Hi,
> 
> If I try:
> print(exec 'notepad');
> 
> It prints "0" to the console. I'm not sure if it's an error code or if
> it is the return value of the program, if it's the return value, it's
> the good one.
> 
> But I got some qx instruction hanging only on my machine. So I'm
> starting to think that my machine got some problem maybe hardware
and/or
> memory problem.

exec isn't supposed to return.  Try changing exec to system and see
what the return code is then - something like this:

my $ret = system 'notepad';
printf "ret=%08X, \$?=$?, \$!=$!, \$^E=$^E\n", $ret;

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to