author | wenzelm |
Mon, 20 Sep 2010 23:36:26 +0200 | |
changeset 39576 | 48baf61cb888 |
parent 35024 | lib/scripts/bash@0faeabd99289 |
child 39581 | 430ff865089b |
permissions | -rwxr-xr-x |
#!/usr/bin/env perl # # Author: Makarius # # exec process - with optional process group and report of pid # use warnings; use strict; # args my ($group, $pid_name, $cmd_line) = @ARGV; # process group if ($group eq "group") { use POSIX "setsid"; POSIX::setsid || die $!; } # pid open (PID_FILE, ">", $pid_name) || die $!; print PID_FILE "$$"; close PID_FILE; # exec process exec "$cmd_line";