Non-blocking pipes still appear to be isBlocking

Charles Oliver Nutter headius at headius.com
Wed Jan 31 01:34:23 UTC 2024


On Tue, Jan 30, 2024 at 6:54 PM Robert Engels <rengels at ix.netcom.com> wrote:
>
> Rather than sharing the file descriptors why not use a named pipe. Each side that opens the pipe controls their blocking/non-blocking mode.

Well, for one thing they would have to be managed on the filesystem,
and that's extra steps that JRuby users would need to take. The way it
works now is with traditional pipes, dup'ed and closed as needed by
posix_spawn during the child process launch.

On Tue, Jan 30, 2024 at 1:12 AM Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> The pipe channel could be changed to work like the network channels and change it lazily,

It occurred to me that this would actually fix my problem very neatly.
The child side of the pipes would never be used from the parent, so
they would propagate with default blocking status. The parent streams
would be blocking until used from a vthread... or more likely, until
JRuby explicitly sets them nonblocking to match CRuby).

The current situation is messy because pipe streams are now suddenly
O_NONBLOCK by default, even if we want them to be blocking, and
resetting them to blocking is pretty ugly.


More information about the loom-dev mailing list