Skip to content

Instantly share code, notes, and snippets.

@alexcrichton
Created September 18, 2012 17:17
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 alexcrichton/3744405 to your computer and use it in GitHub Desktop.
Save alexcrichton/3744405 to your computer and use it in GitHub Desktop.
setpgid(0,0);
exec("${command}");
# I think the below comment is a little bit full of lies
#
# we need to do this because somehow sml manages to
# fork a second internal process that ignores direct
# kills of the child. instead we create a new process
# group and then send an INT process to the direct child
# which then passes a KILL onto every process in its new group.
die "exec failed";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment