Is there a bug in this code, or are things not working as documented?#!/usr/bin/perl -w use strict; $SIG{TERM}= sub { print "TERM $$\n"; exit(1); }; if (my $kidpid = fork) { # Parent sleep(1); print "\n"; kill -15, $kidpid; sleep(5); } else { print "CREATED CHILD $$\n"; # Child for my $i (1..10) { if (!fork) { # Grandchild print "CREATED GRANDCHILD $$\n"; sleep(5); exit(0); } } sleep(300); }
In reply to Re: Re: Killing child process
by sgifford
in thread Killing child process
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |