Use the 'exec PROGRAM LIST' form of exec() so that running a command with no arguments doesn't get split up into words. Fixes executing a command with no arguments that has spaces in the path.
git-svn-id: svn://10.0.0.236/trunk@142581 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
db0fb6bb36
commit
f1fc6dc283
@ -23,7 +23,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
|
||||
use File::Find ();
|
||||
use File::Copy;
|
||||
|
||||
$::UtilsVersion = '$Revision: 1.239 $ ';
|
||||
$::UtilsVersion = '$Revision: 1.240 $ ';
|
||||
|
||||
package TinderUtils;
|
||||
|
||||
@ -1203,7 +1203,7 @@ sub fork_and_log {
|
||||
open STDERR, ">&STDOUT";
|
||||
select STDOUT; $| = 1; # make STDOUT unbuffered
|
||||
select STDERR; $| = 1; # make STDERR unbuffered
|
||||
exec @$args;
|
||||
exec { $args->[0] } @$args;
|
||||
die "Could not exec()";
|
||||
}
|
||||
return $pid;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user