
applefreakpeeps
New User
Dec 14, 2009, 9:09 AM
Post #1 of 3
(1800 views)
|
|
Return value of system()
|
Can't Post
|
|
system() seems to behave funnily here: my $exit_val = system("perl -e 'use English; use strict; kill 11, \$PID"); print $exit_val; I get 35584 (ie. Exit value: 139, Signal: 0, Coredump: 0) which is incorrect If I write the same code in a separate perl file (say abc.pl) and execute abc.pl via system then: my $exit_val = system("perl abc.pl"); print $exit_val; I get 139 (ie. Exit value: 0, Signal: 11, Coredump: 127) which is correct. Can anyone please point out the reason for this discrepancy?
|