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
Родитель 486171d5d2
Коммит 3261f6eb5b
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