This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
5.004_56: Patch to Tie::Hash and docs
[perl5.git] / t / op / fork.t
1 #!./perl
2
3 # $RCSfile: fork.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:53 $
4
5 BEGIN {
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
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 }