File: kill0_child

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (14 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# kill0_child: an auxiliary script called from t/op/kill0.t
#
# $ARGV[0] is the filename that is used to notify the parent .t perl
# process that all PIDs are started in the process tree.
# The numbers 9999s and 9998 are intended to be eye catching; they will
# only appear if we're not killed in time.

system(1, $^X, '-e', 'sleep 5; print qq|not ok 9999 - inner child process wasn\'t killed\n|;');
system('echo outer child started > "'.$ARGV[0].'"');
sleep 5;

# execution won't reach here if the test is successful
print "not ok 9998 - outer child process wasn\'t killed\n";
unlink($ARGV[0]);