Commit | Line | Data |
8d063cd8 |
1 | #!./perl |
2 | |
79072805 |
3 | # $RCSfile: fork.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:53 $ |
8d063cd8 |
4 | |
774d564b |
5 | BEGIN { |
6 | chdir 't' if -d 't'; |
93430cb4 |
7 | unshift @INC, '../lib'; |
774d564b |
8 | require Config; import Config; |
9 | unless ($Config{'d_fork'}) { |
10 | print "1..0\n"; |
11 | exit 0; |
12 | } |
13 | } |
14 | |
8d063cd8 |
15 | $| = 1; |
16 | print "1..2\n"; |
17 | |
18 | if ($cid = fork) { |
19 | sleep 2; |
20 | if ($result = (kill 9, $cid)) {print "ok 2\n";} else {print "not ok 2 $result\n";} |
21 | } |
22 | else { |
23 | $| = 1; |
24 | print "ok 1\n"; |
25 | sleep 10; |
26 | } |