| Commit message (Expand) | Author | Age | Files | Lines |
| * | include cleanups: remove unused headers and add feature test macros | Szabolcs Nagy | 2013-12-12 | 1 | -1/+1 |
| * | remove cruft from pre-posix_spawn version of the system function | Rich Felker | 2013-03-24 | 1 | -6/+0 |
| * | consistently use the internal name __environ for environ•••patch by Jens Gustedt.
previously, the intended policy was to use __environ in code that must
conform to the ISO C namespace requirements, and environ elsewhere.
this policy was not followed in practice anyway, making things
confusing. on top of that, Jens reported that certain combinations of
link-time optimization options were breaking with the inconsistent
references; this seems to be a compiler or linker bug, but having it
go away is a nice side effect of the changes made here.
| Rich Felker | 2013-02-17 | 1 | -2/+2 |
| * | base system() on posix_spawn•••this avoids duplicating the fragile logic for executing an external
program without fork.
| Rich Felker | 2013-02-03 | 1 | -39/+24 |
| * | system is a cancellation point•••ideally, system would also be cancellable while running the external
command, but I cannot find any way to make that work without either
leaking zombie processes or introducing behavior that is far outside
what the standard specifies. glibc handles cancellation by killing the
child process with SIGKILL, but this could be unsafe in that it could
leave the data being manipulated by the command in an inconsistent
state.
| Rich Felker | 2012-10-28 | 1 | -0/+3 |
| * | fix usage of locks with vfork•••__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.
| Rich Felker | 2012-10-19 | 1 | -1/+2 |
| * | overhaul system() and popen() to use vfork; fix various related bugs•••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.
| Rich Felker | 2012-10-18 | 1 | -23/+42 |
| * | initial check-in, version 0.5.0 | Rich Felker | 2011-02-12 | 1 | -0/+45 |