doc/glibc-functions/pipe2.texi


Log

Author Commit Date CI Message
Bruno Haible 8661b04d 2012-01-26T22:21:45 pipe2: refine doc about thread-safety * doc/glibc-functions/pipe2.texi: Clarify the extent of the multithread-safety problem. * doc/glibc-functions/accept4.texi: Likewise.
Eric Blake 41423a6c 2012-01-26T08:31:48 pipe2, assign4: document lack of thread-safety in replacement * doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety issue in replacement. * doc/glibc-functions/accept4.texi (accept4): Likewise. Based on a report by Eric Wong.
Bruno Haible fca3cc12 2012-01-08T19:57:28 doc: Update for Solaris 11 2011-11. * doc/*/*.texi: Mention Solaris 11 2011-11 where appropriate. * m4/printf.m4: Update comments.
Bruno Haible 4e39aa42 2011-09-11T21:56:17 doc: Update regarding MSVC 9. * doc/gnulib-intro.texi (Target Platforms): Classify MSVC as "rarely tested". * doc/posix-functions/*.texi: Update with info about MSVC 9. * doc/posix-headers/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * doc/glibc-headers/*.texi: Likewise.
Bruno Haible ca2c8579 2011-07-31T14:31:24 Documentation about Minix. * doc/posix-headers/*.texi: Add info about Minix 3.1.8. * doc/glibc-headers/*.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Eric Blake 3dbe75e4 2011-06-29T15:46:50 pipe, pipe2: don't corrupt fd on error I noticed a potential subtle double-close bug in libvirt. There, a common idiom is to initialize an int fd[2]={-1,-1}, then have multiple error paths goto common cleanup code. In the cleanup code, the fds are closed if they are not already -1; this works if the error label is reached before the pipe call, or after pipe succeeds, but if it was the pipe call itself that jumped to the error label, then it is relying on failed pipe() not altering the values already in fd array prior to the failure. Our pipe2 replacement violated this assumption, and could leave a non-negative value in the array, which in turn would let libvirt close an already-closed fd, possibly nuking an unrelated fd opened by another thread that happened to get the same value. As a result, I raised a POSIX issue regarding the behavior of pipe on failure: http://austingroupbugs.net/view.php?id=467 Using that test program, I learned that most systems leave fd unchanged on error, but that mingw always assigns -1 into the array. This fixes the mingw pipe() replacement, as well as the gnulib pipe2() replacement. I don't know of any race-free way to work around a cygwin crash: http://cygwin.com/ml/cygwin/2011-06/msg00328.html - we could always open() and then close() two fds to guess whether two spare fd still remain before calling pipe(), but that is racy. * lib/pipe.c (pipe): Leave fd unchanged on error. * lib/pipe2.c (pipe2): Likewise. * doc/posix-functions/pipe.texi (pipe): Document cygwin issue. * doc/glibc-functions/pipe2.texi (pipe2): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 64e33838 2011-06-03T00:10:00 pipe2: Remove dependency on 'nonblocking' module. * lib/pipe2.c: Include verify.h. Include nonblocking.h only if O_NONBLOCK is defined by gnulib. (pipe2) [WIN32]: If O_NONBLOCK is not defined by gnulib, verify that it is zero. * modules/pipe2 (Depends-on): Add verify. Remove nonblocking. * tests/test-pipe2.c: Include nonblocking.h only if O_NONBLOCK is defined by gnulib. (get_nonblocking_flag): New function. (main): Test O_NONBLOCK flag only if it is nonzero.
Bruno Haible e8eabe5a 2010-12-04T11:38:40 Update for Solaris 11 2010-11. * doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11 Express, released in November 2010.
Bruno Haible 6ef93da4 2010-11-21T21:31:19 Update for NetBSD 5.0. * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on NetBSD; the test fails on NetBSD 5.0. * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info about NetBSD.
Bruno Haible 4ef8b649 2010-11-21T18:42:29 Update for MacOS X 10.5. * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on MacOS X; the test fails on MacOS X 10.5.8. * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info about MacOS X.
Eric Blake e2843e30 2010-05-04T08:18:30 docs: update cygwin progress * doc/posix-functions/wctob.texi (wctob): Cygwin 1.7.6 will fix this bug. * doc/glibc-functions/get_nprocs_conf.texi (get_nprocs_conf): Added in cygwin 1.7.2. * doc/glibc-functions/get_phys_pages.texi (get_phys_pages): Likewise. * doc/glibc-functions/get_avphys_pages.texi (get_avphys_pages): Likewise. * doc/glibc-functions/dup3.texi (dup3): Likewise. * doc/glibc-functions/pipe2.texi (pipe2): Likewise. * doc/glibc-functions/accept4.texi (accept4): Likewise. * doc/posix-functions/strfmon.texi (strfmon): Likewise. * doc/glibc-functions/get_nprocs.texi (get_nprocs): Likewise. Mention nproc module. * doc/glibc-functions/xdr_uint16_t.texi (xdr_uint16_t): Mention bug in cygwin 1.7.5 addition. * doc/glibc-functions/xdr_uint32_t.texi (xdr_uint32_t): Likewise. * doc/glibc-functions/xdr_uint64_t.texi (xdr_uint64_t): Likewise. * doc/glibc-functions/xdr_uint8_t.texi (xdr_uint8_t): Likewise. * doc/glibc-functions/xdr_array.texi (xdr_array): Added in cygwin 1.7.5. * doc/glibc-functions/xdr_bool.texi (xdr_bool): Likewise. * doc/glibc-functions/xdr_bytes.texi (xdr_bytes): Likewise. * doc/glibc-functions/xdr_char.texi (xdr_char): Likewise. * doc/glibc-functions/xdr_double.texi (xdr_double): Likewise. * doc/glibc-functions/xdr_enum.texi (xdr_enum): Likewise. * doc/glibc-functions/xdr_float.texi (xdr_float): Likewise. * doc/glibc-functions/xdr_free.texi (xdr_free): Likewise. * doc/glibc-functions/xdr_hyper.texi (xdr_hyper): Likewise. * doc/glibc-functions/xdr_int.texi (xdr_int): Likewise. * doc/glibc-functions/xdr_int16_t.texi (xdr_int16_t): Likewise. * doc/glibc-functions/xdr_int32_t.texi (xdr_int32_t): Likewise. * doc/glibc-functions/xdr_int64_t.texi (xdr_int64_t): Likewise. * doc/glibc-functions/xdr_int8_t.texi (xdr_int8_t): Likewise. * doc/glibc-functions/xdr_long.texi (xdr_long): Likewise. * doc/glibc-functions/xdr_longlong_t.texi (xdr_longlong_t): Likewise. * doc/glibc-functions/xdr_netobj.texi (xdr_netobj): Likewise. * doc/glibc-functions/xdr_opaque.texi (xdr_opaque): Likewise. * doc/glibc-functions/xdr_pointer.texi (xdr_pointer): Likewise. * doc/glibc-functions/xdr_reference.texi (xdr_reference): Likewise. * doc/glibc-functions/xdr_short.texi (xdr_short): Likewise. * doc/glibc-functions/xdr_sizeof.texi (xdr_sizeof): Likewise. * doc/glibc-functions/xdr_string.texi (xdr_string): Likewise. * doc/glibc-functions/xdr_u_char.texi (xdr_u_char): Likewise. * doc/glibc-functions/xdr_u_hyper.texi (xdr_u_hyper): Likewise. * doc/glibc-functions/xdr_u_int.texi (xdr_u_int): Likewise. * doc/glibc-functions/xdr_u_long.texi (xdr_u_long): Likewise. * doc/glibc-functions/xdr_u_longlong_t.texi (xdr_u_longlong_t): Likewise. * doc/glibc-functions/xdr_u_short.texi (xdr_u_short): Likewise. * doc/glibc-functions/xdr_union.texi (xdr_union): Likewise. * doc/glibc-functions/xdr_vector.texi (xdr_vector): Likewise. * doc/glibc-functions/xdr_void.texi (xdr_void): Likewise. * doc/glibc-functions/xdr_wrapstring.texi (xdr_wrapstring): Likewise. * doc/glibc-functions/xdrmem_create.texi (xdrmem_create): Likewise. * doc/glibc-functions/xdrrec_create.texi (xdrrec_create): Likewise. * doc/glibc-functions/xdrrec_endofrecord.texi (xdrrec_endofrecord): Likewise. * doc/glibc-functions/xdrrec_eof.texi (xdrrec_eof): Likewise. * doc/glibc-functions/xdrrec_skiprecord.texi (xdrrec_skiprecord): Likewise. * doc/glibc-functions/xdrstdio_create.texi (xdrstdio_create): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 7988d730 2009-08-22T18:46:44 New module 'pipe2'.
Bruno Haible 37b2d882 2009-08-22T15:25:51 Reference some new glibc functions.