diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-07-09 01:21:13 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-17 18:10:44 +0000 |
commit | d5a9bfb0fc8643b1208bad4f15e3c88ef46b4160 (patch) | |
tree | e0ca8ae480c779cf765b24fc29e445524f8fecf2 /t | |
parent | 2f96c7027cf9ba783b07d2fd9195877ecc1a4b55 (diff) | |
download | perl-d5a9bfb0fc8643b1208bad4f15e3c88ef46b4160.tar.gz |
make system() return -1 and set $! if exec of child failed
Message-ID: <19990709052113.A6201@monk.mps.ohio-state.edu>
Subject: [PATCH 5.005_57] system()==-1 and $! from failing fork/exec
p4raw-id: //depot/perl@3679
Diffstat (limited to 't')
-rwxr-xr-x | t/op/exec.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/op/exec.t b/t/op/exec.t index 5cf7386c93..99af53b29d 100755 --- a/t/op/exec.t +++ b/t/op/exec.t @@ -25,7 +25,9 @@ if (system "true") {print "not ok 4\n";} else {print "ok 4\n";} if ((system "/bin/sh -c 'exit 1'") != 256) { print "not "; } print "ok 5\n"; -if ((system "lskdfj") == 255 << 8) {print "ok 6\n";} else {print "not ok 6\n";} +$rc = system "lskdfj"; +if ($rc == 255 << 8 or $rc == -1 and ($! == 2 or $! =~ /\bno\b.*\bfile/i)) + {print "ok 6\n";} else {print "not ok 6\n";} unless (exec "lskdjfalksdjfdjfkls") {print "ok 7\n";} else {print "not ok 7\n";} |