author | huffman |
Mon, 08 Feb 2010 15:49:01 -0800 | |
changeset 35059 | acbc346e5310 |
parent 34197 | aecdcaaa8ff3 |
permissions | -rw-r--r-- |
# # Author: Makarius # # system.pl - invoke shell command line (with robust signal handling) # # args ($group, $script_name, $pid_name, $output_name) = @ARGV; # process id if ($group eq "group") { use POSIX "setsid"; POSIX::setsid || die $!; } open (PID_FILE, ">", $pid_name) || die $!; print PID_FILE "$$"; close PID_FILE; # exec script $SIG{'INT'} = "DEFAULT"; #paranoia setting, required for Cygwin exec qq/exec bash '$script_name' > '$output_name'/;