#!/usr/bin/perl use POSIX qw(pause); use strict; my $ppid=$$; $SIG{HUP}=sub {return}; my $pid=fork; if ($pid){ pause; print "parent woke up\n"; waitpid $pid,0; print "parent reaped child\n"; } else { die "fork error $!" if (!defined $pid); sleep 2; # what can I say, it works. print "child is about to signal parent (at $ppid)\n"; # `kill -1 $ppid`; my $cnt=kill,1,$ppid; print "child signaled $cnt process(es)\n"; print "child about to exit\n"; exit; }