![]() When opening the write end of a fifo that doesn't have a reader already, the old implementation could allow writing bytes that are discarded. This new implementation uses a blocking `open` in a `pthread`, and that way the write routines know whether the stream is ready for writing or not. The difference is visible in the Racket API in a two places: `subprocess` needs to wait until a fifo writer is connected before attempting to dup the corresponding file descriotor, and more generally a use of `unsafe-port->file-descriptor` needs to wait. The former blocking operation is now build into `subprocess` (and documented), but the burden is place on callers of `unsafe-port->file-descriptor` to wait is necessary. The new `port-waiting-peer?` predicate exposes the waiting state, while `sync` is sufficient to wait for a peer. Closes #2784 |
||
---|---|---|
.. | ||
collects | ||
src | ||
.gitignore |