Browse files

STDIN stays open by default

  • Loading branch information...
1 parent 8135cbf commit 08f674c315f21fcf487d445d02b9cf7dc40677b7 @mnunberg committed Dec 19, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/POE/Wheel/Run.pm
View
9 lib/POE/Wheel/Run.pm
@@ -304,7 +304,12 @@ sub new {
# Use IO::Pty if requested. IO::Pty turns on autoflush for us.
- if(defined $stdout_event or defined $stdin_event or defined $stderr_event) {
+ if(defined $stdout_event
+ or defined $stdin_event
+ or defined $stderr_event
+ or (!$no_stdin))
+ #Bypass all the conduit handling if the user does not care for child I/O
+ {
if ($conduit =~ /^pty(-pipe)?$/) {
croak "IO::Pty is not available" unless PTY_AVAILABLE;
@@ -340,7 +345,7 @@ sub new {
unless defined $$rfd_ref and defined $$wfd_ref;
}
}
- unless (defined $redir_in or $no_stdin) {
+ unless (defined($redir_in) or $no_stdin) {
($stdin_read, $stdin_write) = POE::Pipe::OneWay->new();
croak "could not make stdin pipe $!"
unless defined $stdin_write and defined $stdin_read;

0 comments on commit 08f674c

Please sign in to comment.