1. 31 8月, 2020 1 次提交
  2. 02 9月, 2013 1 次提交
  3. 25 3月, 2013 1 次提交
  4. 09 11月, 2012 1 次提交
    • R
      clean up sloppy nested inclusion from pthread_impl.h · efd4d87a
      Rich Felker 提交于
      this mirrors the stdio_impl.h cleanup. one header which is not
      strictly needed, errno.h, is left in pthread_impl.h, because since
      pthread functions return their error codes rather than using errno,
      nearly every single pthread function needs the errno constants.
      
      in a few places, rather than bringing in string.h to use memset, the
      memset was replaced by direct assignment. this seems to generate much
      better code anyway, and makes many functions which were previously
      non-leaf functions into leaf functions (possibly eliminating a great
      deal of bloat on some platforms where non-leaf functions require ugly
      prologue and/or epilogue).
      efd4d87a
  5. 22 10月, 2012 1 次提交
  6. 20 10月, 2012 1 次提交
    • R
      fix usage of locks with vfork · 599f9736
      Rich Felker 提交于
      __release_ptc() is only valid in the parent; if it's performed in the
      child, the lock will be unlocked early then double-unlocked later,
      corrupting the lock state.
      599f9736
  7. 19 10月, 2012 1 次提交
    • R
      overhaul system() and popen() to use vfork; fix various related bugs · 44eb4d8b
      Rich Felker 提交于
      since we target systems without overcommit, special care should be
      taken that system() and popen(), like posix_spawn(), do not fail in
      processes whose commit charges are too high to allow ordinary forking.
      
      this in turn requires special precautions to ensure that the parent
      process's signal handlers do not end up running in the shared-memory
      child, where they could corrupt the state of the parent process.
      
      popen has also been updated to use pipe2, so it does not have a
      fd-leak race in multi-threaded programs. since pipe2 is missing on
      older kernels, (non-atomic) emulation has been added.
      
      some silly bugs in the old code should be gone too.
      44eb4d8b
  8. 21 6月, 2012 2 次提交
    • R
      make popen cancellation-safe · 9c21f434
      Rich Felker 提交于
      close was the only cancellation point called from popen, but it left
      popen with major resource leaks if any call to close got cancelled.
      the easiest, cheapest fix is just to use a non-cancellable close
      function.
      9c21f434
    • R
      popen: handle issues with fd0/1 being closed · f305467a
      Rich Felker 提交于
      also check for failure of dup2 and abort the child rather than
      reading/writing the wrong file.
      f305467a
  9. 12 2月, 2011 1 次提交