Project

General

Profile

Actions

Bug #9356

closed

TCPSocket.new does not seem to handle INTR

Added by Anonymous about 10 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:59516]

Description

TCPSocket.new does not seem to handle EINTR properly.

In the attached test script, I try to open a TCP connection to my server and make an HTTP request while a background thread continually sends a signal to the process.

This causes the #write call to fail with:

x.rb:13:in write': Socket is not connected (Errno::ENOTCONN) from x.rb:13:in '

This also appears to affect 2.0.0. 1.9.3 is unaffected.


Files

socket-eintr.rb (207 Bytes) socket-eintr.rb Anonymous, 01/03/2014 07:29 PM
wait_connectable_infinite_loop_minimal_fix.diff (478 Bytes) wait_connectable_infinite_loop_minimal_fix.diff shugo (Shugo Maeda), 02/21/2014 01:00 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #9547: TCPSocket.new causes an infinite loop when interrupted by a signalClosed02/21/2014Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0