summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/posix_spawn.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* environ and __progname are not declared in a public header; declare themguenther2016-03-131-3/+1
| | | | | | in libc's hidden/stdlib.h instead of in each .c file that needs one ok deraadt@ gsoares@ mpi@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-231-3/+4
| | | | | | | | | into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
* Pull in namespace.h when building all .c files using gcc's -include option,guenther2015-09-101-2/+1
| | | | | | | | so that we can provide asm labels for the memcpy/memset/__stack_smash_handler calls that it generates ab initio. Eliminate direct #includes of it. Make sure it's a dependency of all objects (unnecessary for asm, but close enough). ok deraadt@
* _NSIG is the number of valid signals including signal 0, so it's not a validjmatthew2014-11-141-2/+2
| | | | | | | signal number itself. Attempting to reset the signal action for it causes posix_spawn to fail, making the POSIX_SPAWN_SETSIGDEF flag unusable. ok guenther@
* Fix previous commit: fd wasn't set in the FAE_DUP2 caseguenther2014-09-021-3/+4
|
* Add additional userland interfaces for setting close-on-exec on fdsguenther2014-08-311-3/+12
| | | | | | | | | | | | | when creating them: mkostemp(), mkostemps(), the 'e' mode letter for fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will be cleared by the action created by posix_spawn_file_actions_adddup2(). Also, add support for the C11 'x' mode letter for fopen() and freopen(), setting O_EXCL when possibly creating files. Note: this requires kernel support for pipe2() and dup3()! ok millert@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-3/+1
| | | | ok guenther millert kettenis
* clean the sigact in a portable way; ok matthewderaadt2012-03-221-2/+5
|
* Implement execvpe(3) and posix_spawn(3) and family. Based onmatthew2012-03-211-0/+468
FreeBSD's implementation via Frank Denis, with various cleanups and tweaks by me. ok deraadt@, guenther@; discussions and tweaks from many others jmc@ promises to help me further with the man pages in tree