Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IO-Tty CPAN distribution.

Report information
The Basics
Id:
61642
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
TODDR [...] cpan.org
Requestors:
Brian.Kelly [...] fullautosoftware.net
Cc:
AdminCc:

BugTracker
Severity:
Critical
Broken in:
  • 1.08
  • 1.08_01
  • 1.08_02
Fixed in:
1.08_03



Subject: test.pl for IO::Pty need critical fix
This issue was also reported by someone else to the Perl Monks site: http://www.perlmonks.org/?displaytype=print;node_id=857756;replies=1 With the latest version of Cygwin 1.7.7-1 IO::Pty builds fine, but the test hangs and does not return. To resolve this, not just for Cygwin, but also for AIX where I encountered the same behavior (but not in Ubuntu or Linux or Solaris), the master PTY has to be explicitly CLOSED. This is the current 'unless' block in test.pl (starting at LINE 37): unless ($pid) { # child closes stdin/out and reports test result via exit status sleep 0; close STDIN; close STDOUT; my $master = new IO::Pty; my $slave = $master->slave(); if ($master->fileno < 3 or $slave->fileno < 3) { die 'ERROR: masterfd='.$master->fileno.', slavefd='.$slave->fileno."\n"; } exit(0); } AND here is one I modified in order to introduce the needed close command: unless ($pid) { # child closes stdin/out and reports test result via exit status sleep 0; close STDIN; close STDOUT; my $master = new IO::Pty; my $slave = $master->slave(); my $master_fileno=$master->fileno; # new my $slave_fileno=$slave->fileno; # new $master->close(); # new CRITICAL if ($master->fileno < 3 or $slave->fileno < 3) { # altered die 'ERROR: masterfd='.$master->fileno.', slavefd='.$slave->fileno."\n"; # altered } exit(0); } I've tested this change thoroughly, and it is the only one needed. My Net::FullAuto module is dependent on IO::Pty, and I *need* this to install cleanly in Cygwin and AIX via the CPAN. Thanks for your help. Brian Kelly (author of Term::Menus and Net::FullAuto)
Somehow I earlier posted a fix that wasn't "complete". Not that after the close() of the PTY, variables, not handles, are used for the fileno tests. unless ($pid) { # child closes stdin/out and reports test result via exit status sleep 0; close STDIN; close STDOUT; my $master = new IO::Pty; my $slave = $master->slave(); my $master_fileno=$master->fileno; # new my $slave_fileno=$slave->fileno; # new $master->close(); # new CRITICAL if ($master_fileno < 3 or $slave_fileno < 3) { # altered die 'ERROR: masterfd='.$master_fileno.', slavefd='.$slave_fileno."\n"; # altered } exit(0); }
Somehow I earlier posted a fix that wasn't "complete". Note that after the close() of the PTY, variables, not handles, are used for the fileno tests. unless ($pid) { # child closes stdin/out and reports test result via exit status sleep 0; close STDIN; close STDOUT; my $master = new IO::Pty; my $slave = $master->slave(); my $master_fileno=$master->fileno; # new my $slave_fileno=$slave->fileno; # new $master->close(); # new CRITICAL if ($master_fileno < 3 or $slave_fileno < 3) { # altered die 'ERROR: masterfd='.$master_fileno.', slavefd='.$slave_fileno."\n"; # altered } exit(0); }
test.pl went away in 1.08_02. I've made the fix you requested in 1.08_03. Please review.
1.09 was released as the test seems to be mostly behaving on the majority of CPAN testers platforms.
Subject: Re: [rt.cpan.org #61642] Resolved: test.pl for IO::Pty need critical fix
Date: Mon, 4 Oct 2010 14:58:04 -0500 (GMT-05:00)
To: bug-IO-Tty@rt.cpan.org
From: Brian Kelly <reedfish@ix.netcom.com>
AWESOME! Thanks Todd!!
Show quoted text
-----Original Message-----
>From: Todd Rinaldo via RT <bug-IO-Tty@rt.cpan.org> >Sent: Oct 4, 2010 2:49 PM >To: Brian.Kelly@fullautosoftware.net >Subject: [rt.cpan.org #61642] Resolved: test.pl for IO::Pty need critical fix > ><URL: https://rt.cpan.org/Ticket/Display.html?id=61642 > > >According to our records, your request has been resolved. If you have any >further questions or concerns, please respond to this message.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.