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.
This commit is contained in:
Родитель
9183d9bebf
Коммит
1f9d3b6c54
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче