jilles
04619555a4
libc: Allow setting close-on-exec in fopen/freopen/fdopen.
...
This commit adds a new mode option 'e' that must follow any 'b', '+' and/or
'x' options. C11 is clear about the 'x' needing to follow 'b' and/or '+' and
that is what we implement; therefore, require a strict position for 'e' as
well.
For freopen() with a non-NULL path argument and fopen(), the close-on-exec
flag is set iff the 'e' mode option is specified. For freopen() with a NULL
path argument and fdopen(), the close-on-exec flag is turned on if the 'e'
mode option is specified and remains unchanged otherwise.
Although the same behaviour for fopen() can be obtained by open(O_CLOEXEC)
and fdopen(), this needlessly complicates the calling code.
Apart from the ordering requirement, the new option matches glibc.
PR: kern/169320
2012-11-30 23:51:33 +00:00
..
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2008-05-05 16:03:52 +00:00
2009-03-04 03:38:51 +00:00
2007-01-09 00:28:16 +00:00
2012-04-24 17:51:36 +00:00
2012-11-30 23:51:33 +00:00
2008-05-05 16:03:52 +00:00
2009-01-28 14:38:41 +00:00
2008-05-05 16:03:52 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2009-02-28 06:00:58 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2012-05-09 17:27:49 +00:00
2007-01-09 00:28:16 +00:00
2012-04-29 16:28:39 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2008-05-05 16:03:52 +00:00
2012-04-24 17:51:36 +00:00
2012-11-30 23:51:33 +00:00
2007-01-09 00:28:16 +00:00
2012-11-30 23:51:33 +00:00
2008-04-22 17:03:32 +00:00
2011-11-20 14:45:42 +00:00
2012-05-30 04:06:38 +00:00
2007-01-09 00:28:16 +00:00
2007-04-19 14:01:04 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2007-01-09 00:28:16 +00:00
2012-04-21 07:31:27 +00:00
2007-01-09 00:28:16 +00:00
2010-01-10 14:30:30 +00:00
2012-11-30 23:51:33 +00:00
2011-11-20 14:45:42 +00:00
2007-06-18 02:13:04 +00:00
2008-04-17 22:17:54 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2009-12-05 19:31:38 +00:00
2009-11-25 04:21:42 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2008-04-17 22:17:54 +00:00
2011-11-20 14:45:42 +00:00
2010-01-10 14:30:30 +00:00
2011-11-20 14:45:42 +00:00
2010-01-08 22:02:42 +00:00
2008-05-05 16:03:52 +00:00
2008-05-05 16:03:52 +00:00
2009-10-04 19:43:36 +00:00
2012-03-29 05:02:12 +00:00
2009-02-28 06:00:58 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2007-01-09 00:28:16 +00:00
2012-04-29 16:28:39 +00:00
2007-01-09 00:28:16 +00:00
2012-05-23 17:13:30 +00:00
2012-03-04 16:44:04 +00:00
2010-02-28 13:31:29 +00:00
2007-01-09 00:28:16 +00:00
2012-05-23 17:13:30 +00:00
2010-12-02 13:40:21 +00:00
2012-11-08 02:01:04 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2009-03-02 04:07:58 +00:00
2007-01-09 00:28:16 +00:00
2008-05-05 16:03:52 +00:00
2008-05-05 16:03:52 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2008-04-17 22:17:54 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2012-09-14 21:28:56 +00:00
2012-05-12 20:27:13 +00:00
2011-11-20 14:45:42 +00:00
2012-04-28 21:50:30 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2009-03-04 03:38:51 +00:00
2008-05-05 16:14:02 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2010-05-13 12:07:55 +00:00
2007-01-09 00:28:16 +00:00
2007-01-09 00:28:16 +00:00
2008-04-17 22:17:54 +00:00
2007-01-09 00:28:16 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2012-04-30 11:28:17 +00:00
2012-04-21 06:10:18 +00:00
2012-04-30 11:28:17 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2012-04-21 06:10:18 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2011-11-20 14:45:42 +00:00
2007-01-09 00:28:16 +00:00
2010-05-13 12:07:55 +00:00
2011-11-20 14:45:42 +00:00
2012-05-12 20:27:13 +00:00
2011-11-20 14:45:42 +00:00
2009-01-08 06:38:06 +00:00
2011-03-06 19:47:46 +00:00
2012-07-04 17:35:07 +00:00