and it both painful and a bit dangerous to close all open file descriptors
Probably meant to be "and it is both".
we'd have to scan all possible fds and close any that we don't want open (normally exec() closes any non-inheritable but we don't exec() for &sub processes.
The parenthesis that opens before "normally" does not seem to close.
Probably meant to be "and it is both".
The parenthesis that opens before "normally" does not seem to close.