Skip Menu |

This queue is for tickets about the Daemon-Generic CPAN distribution.

Report information
The Basics
Id: 58287
Status: resolved
Priority: 0/
Queue: Daemon-Generic

Owner: Nobody in particular
Requestors: HALKEYE [...]

Bug Information
Severity: Important
Broken in: 0.61
Fixed in: (no value)

Subject: Shell hangs on logout
Download (untitled) / with headers
text/plain 832b
$ ./daemon start $ logout SSH connection hangs. I'm pretty certain its because STDIN was not delt with. from-Parent has a bit more info. Code from my version (though there's probably a better way of handling this): sub gd_redirect_output { my $self = shift; return if $self->{gd_foreground}; my $logname = $self->gd_logname; my $p = $self->{gd_logpriority} ? "-p $self->{gd_logpriority}" : ""; close(STDIN); close(STDOUT); close(STDERR); open(STDIN, '/dev/null') or die "Can't read /dev/null: $!"; open(STDOUT, "|logger $p -t '$logname'") or die "redirect STDOUT -> STDERR: $!"; open(STDERR, "|logger $p -t '$logname'") or (print "could not open stderr: $!" && exit(1)); }
STDIN is now closed when daemonizing. Fix in version 0.71. Source is now on github.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to