summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/posix_spawn.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix Coverity CID 1016714 Resource leak in process_file_actions_entry()truckman2016-05-251-3/+6
| | | | | | | | Don't leak a file descriptor of _dup2() fails (shouldn't happen). Reported by: Coverity CID: 1016714 MFC after: 1 week
* Fix a mistake in r287292. Despite correctly stating intent in thekib2015-08-301-2/+2
| | | | | | | | | comment above, POSIX_SPAWN_SETSIGMASK and POSIX_SPAWN_SETSIGDEF handlers used libthr interposed functions instead of syscalls. Noted by: jilles Sponsored by: The FreeBSD Foundation MFC after: 6 days
* Switch libc from using _sig{procmask,action,suspend} symbols, whichkib2015-08-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. Since e.g. _sigaction is not interposed by libthr, calling signal() removes thr_sighandler() from the handler slot etc. The result was breaking signal semantic and rtld locking. The added __libc_sigprocmask and other symbols are hidden, they are not exported and cannot be called through PLT. The setjmp/longjmp functions for x86 were changed to use direct calls, and since PIC_PROLOGUE only needed for functional PLT indirection on i386, it is removed as well. The PowerPC bug of calling the syscall directly in the setjmp/longjmp implementation is kept as is. Reported by: Pete French <petefrench@ingresso.co.uk> Tested by: Michiel Boland <boland37@xs4all.nl> Reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* posix_spawn: If an error is detected in the child process, reap the zombie.jilles2011-07-101-1/+4
| | | | | | | | | | Formerly, in this case an error was returned but the pid was also returned to the application, requiring the application to use unspecified behaviour (the returned pid in error situations) to avoid zombies. Now, reap the zombie and do not return the pid. MFC after: 2 weeks
* Fix whitespace inconsistencies in libc in files copyrighted by me.ed2011-06-261-2/+2
|
* posix_spawn(): Do not fail when trying to close an fd that is not open.jilles2011-05-301-5/+2
| | | | | | | | | | | As noted in Austin Group issue #370 (an interpretation has been issued), failing posix_spawn() because an fd specified with posix_spawn_file_actions_addclose() is not open is unnecessarily harsh, and there are existing implementations that do not fail posix_spawn() for this reason. Reviewed by: ed MFC after: 10 days
* Fix a typo.rdivacky2008-10-231-1/+1
| | | | Approved by: kib (mentor)
* Turn execvpe() into an internal libc routine.ed2008-06-231-1/+2
| | | | | | | | | | | | Adding exevpe() has caused some ports to break. Even though execvpe() is a useful routine, it does not conform to any standards. This patch is a little bit different from the patch sent to the mailing list. I forgot to remove execvpe from the Symbol.map (which does not seem to miscompile libc, though). Reviewed by: davidxu Approved by: philip
* Process spawn attributes in POSIX document order.davidxu2008-06-191-21/+22
|
* Style fix.davidxu2008-06-171-1/+2
|
* Change my email address to the one from the FreeBSD project.ed2008-06-171-1/+1
| | | | Approved by: philip (mentor, implicit), davidxu
* Add POSIX routines called posix_spawn() and posix_spawnp(), whichdavidxu2008-06-171-0/+472
can be used as replacements for exec/fork in a lot of cases. This change also added execvpe() which allows environment variable PATH to be used for searching executable file, it is used for implementing posix_spawnp(). PR: standards/122051
OpenPOWER on IntegriCloud