$SIG{INT} = sub {syswrite(STDERR, "$$:\tChild has signaled.\n", 27); }; $parent = $$; print "$$:\tI am the parent.\n"; unless($pid = fork){ print "$$:\tI am the child.\n"; print "$$:\tSending SIGINT to $parent.\n"; kill INT, $parent; exit; } print "$$:\tWaiting for the child to signal.\n"; print "." for(1..100); print "Did I catch it?";
In reply to Win32 signals between parent/child by jrsimmon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |