Skip to content
Snippets Groups Projects
Commit e8b810f5 authored by Ben Gamari's avatar Ben Gamari :turtle: Committed by Greg Steuck
Browse files

cbits: Ensure that fork pipe doesn't shadow std fds

Previously we would assume that the pipe used to communicate
errors from the child back to the parent did not shadow the standard
descriptors (stdin, stdout, and stderr). Somewhat surprisingly, this
appears to hold most platforms. However, OpenBSD appears to be a notable
exception. This lead to the failure of the `processT251` test.

Avoid relying on this assumption by `dup`ing the pipe fds until they end
up out of the standard fd range.

Closes #266.
parent 484286a1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment