Smattr / rumur

yet another model checker
The Unlicense
16 stars 5 forks source link

use close-on-exec to more simply clean up pipe file descriptors #265

Closed Smattr closed 5 months ago

Smattr commented 5 months ago

A recent bug fix in the Zig compiler made me realise this code was unnecessarily carrying open file descriptors (the source ones to the dup2 operations) into the child process. We can address this and simplify the whole situation by taking advantage of the dup2 happening before exec, and thus close-on-exec does what we need.