Skip to content

Instantly share code, notes, and snippets.

@mattn
Created December 8, 2008 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/33345 to your computer and use it in GitHub Desktop.
Save mattn/33345 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use POSIX;
if (my $pid = fork()) {
sleep 3;
kill TERM => $pid;
waitpid( $pid, 0 );
} elsif ($pid == 0) {
sleep 10;
} else {
die "can't fork";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment