diff options
author | Eric Wong <e@80x24.org> | 2016-03-05 07:35:22 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-05 07:35:22 +0000 |
commit | 288f29a022b6b72ec460cf5bf34a183f1b54cc4c (patch) | |
tree | 8f8ddb6cd13e6ba1532f45eff54a5f5e621641be /t | |
parent | 19ccb17a3949bc82bf706cf68c629b0e0d25962e (diff) | |
download | public-inbox-288f29a022b6b72ec460cf5bf34a183f1b54cc4c.tar.gz |
Due to the deterministic way reference counting works, we do not want to drop references to existing FDs even if we no longer need the glob reference; the actual FD is all we can pass through on exec.
Diffstat (limited to 't')
-rw-r--r-- | t/httpd-corner.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t index a6238e48..833eb429 100644 --- a/t/httpd-corner.t +++ b/t/httpd-corner.t @@ -55,10 +55,10 @@ my $spawn_httpd = sub { # pretend to be systemd dup2(fileno($sock), 3) or die "dup2 failed: $!\n"; dup2(fileno($unix), 4) or die "dup2 failed: $!\n"; - $sock = IO::Handle->new_from_fd(3, 'r'); - $sock->fcntl(F_SETFD, 0); - $unix = IO::Handle->new_from_fd(4, 'r'); - $unix->fcntl(F_SETFD, 0); + my $t = IO::Handle->new_from_fd(3, 'r'); + $t->fcntl(F_SETFD, 0); + my $u = IO::Handle->new_from_fd(4, 'r'); + $u->fcntl(F_SETFD, 0); $ENV{LISTEN_PID} = $$; $ENV{LISTEN_FDS} = 2; exec $httpd, @args, "--stdout=$out", "--stderr=$err", $psgi; |