summaryrefslogtreecommitdiff
path: root/pod/perlport.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-26 18:58:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-26 18:58:09 +0000
commit9d6eb86e4075182b9cda16d90e5d387c1537d687 (patch)
treec8b073abff2544db5ebf74b2ba6eb81d0ae9b13d /pod/perlport.pod
parenta2a978ac74e3f07d5ba28e7a4d1f1e4ae67ce129 (diff)
downloadperl-9d6eb86e4075182b9cda16d90e5d387c1537d687.tar.gz
Bad $? assumptions.
p4raw-id: //depot/perl@13891
Diffstat (limited to 'pod/perlport.pod')
-rw-r--r--pod/perlport.pod10
1 files changed, 10 insertions, 0 deletions
diff --git a/pod/perlport.pod b/pod/perlport.pod
index 588b55d14b..a2133484dd 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -1779,6 +1779,16 @@ OS>, OS/390, VM/ESA)
=item system LIST
+In general, do not assume the UNIX/POSIX semantics that you can shift
+the C<$?> left by eight to get the exit value, or that C<$? & 127>
+would give you the number of the signal that terminated the program,
+or that C<$? & 128> would test true if the program was terminated by a
+coredump. Instead, use the POSIX W*() interfaces: for example, use
+WIFEXITED($?) an WEXITVALUE($?) to test for a normal exit and the exit
+value, and WIFSIGNALED($?) and WTERMSIG($?) for a signal exit and the
+signal. Core dumping is not a portable concept so there's no portable
+way to test for that.
+
Only implemented if ToolServer is installed. (S<Mac OS>)
As an optimization, may not call the command shell specified in