lib/scripts/system.pl
changeset 35060 6088dfd5f9c8
parent 35059 acbc346e5310
parent 35054 a5db9779b026
child 35061 be1e25a62ec8
child 35108 eeec2a320a77
     1.1 --- a/lib/scripts/system.pl	Mon Feb 08 15:49:01 2010 -0800
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,28 +0,0 @@
     1.4 -#
     1.5 -# Author: Makarius
     1.6 -#
     1.7 -# system.pl - invoke shell command line (with robust signal handling)
     1.8 -#
     1.9 -
    1.10 -# args
    1.11 -
    1.12 -($group, $script_name, $pid_name, $output_name) = @ARGV;
    1.13 -
    1.14 -
    1.15 -# process id
    1.16 -
    1.17 -if ($group eq "group") {
    1.18 -  use POSIX "setsid";
    1.19 -  POSIX::setsid || die $!;
    1.20 -}
    1.21 -
    1.22 -open (PID_FILE, ">", $pid_name) || die $!;
    1.23 -print PID_FILE "$$";
    1.24 -close PID_FILE;
    1.25 -
    1.26 -
    1.27 -# exec script
    1.28 -
    1.29 -$SIG{'INT'} = "DEFAULT";   #paranoia setting, required for Cygwin
    1.30 -exec qq/exec bash '$script_name' > '$output_name'/;
    1.31 -