[Bps-public-commit] r18426 - Net-Trac/trunk/t
jesse at bestpractical.com
jesse at bestpractical.com
Mon Feb 16 21:20:07 EST 2009
Author: jesse
Date: Mon Feb 16 21:20:06 2009
New Revision: 18426
Modified:
Net-Trac/trunk/t/setup_trac.pl
Log:
* actually restore our original directory after forking a server
Modified: Net-Trac/trunk/t/setup_trac.pl
==============================================================================
--- Net-Trac/trunk/t/setup_trac.pl (original)
+++ Net-Trac/trunk/t/setup_trac.pl Mon Feb 16 21:20:06 2009
@@ -110,12 +110,15 @@
my $self = shift;
my $dir = $self->dir;
my $port = $self->port;
+ my $old_dir = `pwd`;
+ chomp $old_dir;
chdir $dir."/trac";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>/dev/null' or die "Can't write to /dev/null: $!";
defined(my $pid = fork) or die "Can't fork: $!";
if ( $pid ) {
$self->pid($pid);
+ chdir($old_dir);
return $pid;
} else {
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
More information about the Bps-public-commit
mailing list