Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Roll back previous patch. We need to call ->close_slave() on the _read

handles.  Do that instead.
  • Loading branch information...
commit b3cabbb414d0b72ff863695bdcae0de1820a3fbf 1 parent 00ce20e
Philip Gwyn authored
Showing with 9 additions and 23 deletions.
  1. +9 −23 poe/lib/POE/Wheel/Run.pm
View
32 poe/lib/POE/Wheel/Run.pm
@@ -454,33 +454,19 @@ sub new {
}
# Parent here. Close what the parent won't need.
- if (defined $stdin_read) {
- if (ref($stdin_read) eq 'IO::Pty') {
- $stdin_read->close_slave();
- }
- else {
- close $stdin_read;
- }
- }
+ defined $stdin_read && close $stdin_read;
+ defined $stdout_write && close $stdout_write;
+ defined $stderr_write && close $stderr_write;
- if (defined $stdout_write) {
- if (ref($stdout_write) eq 'IO::Pty') {
- $stdout_write->close_slave();
- }
- else {
- close $stdout_write;
- }
+ # Also close any slave ptys
+ if (defined $stdout_read and ref($stdout_read) eq 'IO::Pty') {
+ $stdout_read->close_slave();
}
-
- if (defined $stderr_write) {
- if (ref($stderr_write) eq 'IO::Pty') {
- $stderr_write->close_slave();
- }
- else {
- close $stderr_write;
- }
+ if (defined $stderr_read and ref($stderr_read) eq 'IO::Pty') {
+ $stderr_read->close_slave();
}
+
my $active_count = 0;
$active_count++ if $stdout_event and $stdout_read;
$active_count++ if $stderr_event and $stderr_read;
Please sign in to comment.
Something went wrong with that request. Please try again.