Changeset 87 for trunk/oarutils
- Timestamp:
- Jun 3, 2012, 12:24:54 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oarutils/oar-parexec
r86 r87 243 243 }; 244 244 245 #$job_cmd =~ s/( \s+##.*)$//; # suppress comment245 #$job_cmd =~ s/(#.*)$// if $sig_transmit; # suppress comment 246 246 247 247 # set job environment, run it and clean … … 258 258 $fh->print("cd $current_dir\n"); 259 259 if ($sig_transmit) { 260 $fh->print("trap ' kill -$sig_checkpoint \$(jobs -p)' $sig_checkpoint\n");260 $fh->print("trap 'jobs -p|xargs -r ps -o pid --no-headers --ppid|xargs -r kill -$sig_checkpoint' $sig_checkpoint\n"); 261 261 $fh->print("echo \$\$ > $job_pidfile\n"); 262 $fh->print(" {\n");262 $fh->print("(\n"); 263 263 $fh->print("$job_cmd\n"); 264 $fh->print(" }$job_stdout $job_stderr \&\n");264 $fh->print(") $job_stdout $job_stderr \&\n"); 265 265 $fh->print("while [ \$(jobs -p | wc -l) -gt 0 ]\n"); 266 266 $fh->print("do\n");
Note: See TracChangeset
for help on using the changeset viewer.