Explicitly set cwd to home directory after setting /u/cltbld, apparently MacOSX/Darwin needs this. -mcafee

This commit is contained in:
cltbld%netscape.com 2002-06-21 19:14:13 +00:00
Родитель c80b7c5e07
Коммит e159632d4f
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -23,7 +23,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
$::UtilsVersion = '$Revision: 1.169 $ ';
$::UtilsVersion = '$Revision: 1.170 $ ';
package TinderUtils;
@ -1578,7 +1578,13 @@ sub fork_and_log {
unless ($pid) { # child
$ENV{HOME} = $home if ($Settings::OS ne "BeOS");
# Explicitly set cwd to home dir.
chdir $home or die "chdir($home): $!\n";
# Now cd to dir where binary is..
chdir $dir or die "chdir($dir): $!\n";
open STDOUT, ">$logfile";
open STDERR, ">&STDOUT";
select STDOUT; $| = 1; # make STDOUT unbuffered