This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rudimentary support for remote debugging, from aeons ago (somewhat
[perl5.git] / t / op / fork.t
CommitLineData
8d063cd8
LW
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';
93430cb4 7 unshift @INC, '../lib';
774d564b 8 require Config; import Config;
9 unless ($Config{'d_fork'}) {
45c0de28 10 print "1..0 # Skip: no fork\n";
774d564b 11 exit 0;
12 }
13}
14
8d063cd8
LW
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}