[inseparable changes from patch from perl-5.003_97d to perl-5.003_97e]
[p5sagit/p5-mst-13.2.git] / t / op / fork.t
CommitLineData
8d063cd8 1#!./perl
2
79072805 3# $RCSfile: fork.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:53 $
8d063cd8 4
774d564b 5BEGIN {
6 chdir 't' if -d 't';
7 @INC = '../lib';
8 require Config; import Config;
9 unless ($Config{'d_fork'}) {
10 print "1..0\n";
11 exit 0;
12 }
13}
14
8d063cd8 15$| = 1;
16print "1..2\n";
17
18if ($cid = fork) {
19 sleep 2;
20 if ($result = (kill 9, $cid)) {print "ok 2\n";} else {print "not ok 2 $result\n";}
21}
22else {
23 $| = 1;
24 print "ok 1\n";
25 sleep 10;
26}