as usual, this is non-atomic, but better than producing an error or failing to set the close-on-exec flag at all.