New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IO::Socket async connect() logic is broken on Solaris #11862
Comments
From carson@taltos.orgCreated by carson@taltos.orgThe async connect() logic in IO::Socket is broken for Solaris (and almost There was a recent commit to change the select() logic, but it's still wrong. Below is some very lightly tested code that tries to do the right thing on all platforms. sub connect { $blocking = $sock->blocking(0) if $timeout; my $sel = new IO::Select $sock; undef $!; $sock->blocking(1) if $blocking; $! = $err if $err; $err ? undef : $sock; Perl Info
|
From @jkeenanOn Wed Jan 11 03:39:04 2012, carson@taltos.org wrote:
Thank you for the report. Two requests: Can you provide an example of Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From carson@taltos.orgOn 1/11/12 4:33 PM, James E Keenan via RT wrote:
This is a replacement for the existing connect method in IO/Socket.pm. I And "tries to do the right thing" means: This whole mess is caused by async connect() not having well defined -- |
From @nwc10On Wed, Jan 11, 2012 at 04:33:51PM -0800, James E Keenan via RT wrote:
By "tries to do the right thing" he means "not call connect a second time". I'm not sure if we have any regression tests to check non-blocking connect. Solaris 2.7 refactored the IP stack to be multithreaded. 2.6 was not, hence I suspect that to really test the logic here, one would have to mock the I think in summary, if it's not currently "broken" on the platforms you Nicholas Clark |
From @leonerdOn Thu, Jan 12, 2012 at 08:35:54AM +0000, Nicholas Clark wrote:
If it's any help, I observe that IO::Socket::IP manages to do blocking http://matrix.cpantesters.org/?dist=IO-Socket-IP%200.08;reports=1;os=solaris Admittedly some of the logic in IO::Socket::IP has to end-run around # It seems that IO::Socket hides EINPROGRESS errors, making them look -- leonerd@leonerd.org.uk |
Migrated from rt.perl.org#107962 (status was 'open')
Searchable as RT107962$
The text was updated successfully, but these errors were encountered: