Skip to content
Snippets Groups Projects
Commit 8b3ece09 authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

cbits/fork_exec: Eliminate potential leakage of comm. pipes

Previously we used `fork` followed by `fcntl` to create a pipe with
`O_CLOEXEC`. However, this is potentially racy as another thread may
`fork` in between in these two calls, resulting in the pipe of the
former thread being available to the child of the latter.

Fix this by using `O_CLOEXEC` when creating the communications pipe.

Closes #287.
parent c25afa93
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