close nonstandard fds before forking external processes