Rich Felker 892cafff66 greatly improve freopen behavior
1. don't open /dev/null just as a basis to copy flags; use shared
__fmodeflags function to get the right file flags for the mode.

2. handle the case (probably invalid, but whatever) case where the
original stream's file descriptor was closed; previously, the logic
re-closed it.

3. accept the "e" mode flag for close-on-exec; update dup3 to fallback
to using dup2 so we can simply call __dup3 instead of putting fallback
logic in freopen itself.
2012-10-24 21:16:06 -04:00
..
2012-09-15 23:41:07 -04:00
2012-04-16 18:37:53 -04:00
2012-10-24 21:16:06 -04:00
2012-09-22 16:08:58 -04:00
2012-09-30 20:00:38 -04:00
2012-09-30 19:35:40 -04:00
2012-10-19 15:02:37 -04:00
2012-09-29 01:05:31 -04:00
2012-10-24 21:16:06 -04:00
2012-10-24 21:16:06 -04:00