author | wenzelm |
Thu, 21 Feb 2008 20:16:02 +0100 | |
changeset 26107 | 4b5e5fc1d11f |
parent 26096 | 783f957dcb01 |
child 29145 | b1c6f4563df7 |
permissions | -rw-r--r-- |
1 #
2 # $Id$
3 # Author: Makarius
4 #
5 # system.pl - invoke shell command line (with robust signal handling)
6 #
8 # args
10 ($group, $script_name, $pid_name, $output_name) = @ARGV;
13 # process id
15 if ($group eq "group") {
16 use POSIX "setsid";
17 POSIX::setsid || die $!;
18 }
20 open (PID_FILE, ">", $pid_name) || die $!;
21 print PID_FILE "$$\n";
22 close PID_FILE;
25 # exec script
27 $SIG{'INT'} = "DEFAULT"; #paranoia setting, required for Cygwin
28 exec qq/exec bash '$script_name' > '$output_name'/;