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:
bryner%netscape.com 2003-05-17 08:34:44 +00:00
Родитель 24e41cc460
Коммит a4c1245e01
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;