add 'e' modifier (close-on-exec) to fopen and fdopen