Project

General

Profile

Actions

Bug #13533

closed

please backport r58534

Added by normalperson (Eric Wong) almost 7 years ago. Updated almost 7 years ago.

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

Description

This bug causes busy wait (100% CPU usage) on IO.copy_stream
with sockets/pipes with O_NONBLOCK set.

In other words, the following code should not cause 100% CPU usage,
just hang forever w/o burning CPU:

	require 'io/nonblock'
	r, w = IO.pipe
	r.nonblock = true
	IO.copy_stream(r, IO::NULL)

This affects Ruby 2.3 and 2.4.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0