summaryrefslogtreecommitdiff
path: root/lib/libc/gen/popen.c
Commit message (Collapse)AuthorAgeFilesLines
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-12/+12
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-12/+14
| | | | | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read(). Notes: svn path=/head/; revision=55837
* Conform to POSIX and close any copies of popen() descriptors inherited by aMike Smith1998-10-151-0/+4
| | | | | | | | | | popen()ed child. PR: misc/7810 Submitted by: Wayne Scott <wscott@ichips.intel.com> Notes: svn path=/head/; revision=40367
* Avoid the need for calling functions that malloc after a vfork().Peter Wemm1998-10-111-2/+10
| | | | Notes: svn path=/head/; revision=40219
* vfork -> fork. The child calls execl() which calls malloc(), soBruce Evans1998-10-101-1/+1
| | | | | | | | | | | | vfork() can't be used. We could use alloca() in execl() so that it can be called between vfork() and execve(), but a "portable" popen() shouldn't depend on this. Calling execle() instead of execl() should be fairly safe, since execle() is supposed to be callable from signal handlers and signal handlers can't call malloc(). However, execle() is broken. Notes: svn path=/head/; revision=40191
* FIxed the cleanup. I forgot to leave stdin alone in the usual (!twoway)Bruce Evans1997-04-221-1/+2
| | | | | | | case. Notes: svn path=/head/; revision=25084
* Clean-up my modification of popen.c for vfork. Bruce's (this) is better.John Dyson1997-04-201-10/+12
| | | | | | | Submitted by: Bruce Evans <bde@freebsd.org> Notes: svn path=/head/; revision=25063
* Fix the problem in popen that makes correct vfork semantics fail.John Dyson1997-04-161-6/+11
| | | | | | | | | Specifically, popen modifies a variable "pdes[1]" in the child in such a way that it breaks code in the parent (due to the address space sharing.) Notes: svn path=/head/; revision=24975
* Fixed cleaning up after malloc failure, which was broken by Lite2.Bruce Evans1997-03-111-3/+5
| | | | | | | | | We don't use socketpair(), so don't #include <sys/socket.h>. Restored some gcc-quieting parentheses that were lost in the Lite2 merge. Notes: svn path=/head/; revision=23734
* Merge from Lite2:Peter Wemm1997-03-111-21/+28
| | | | | | | | filesystem include updates, duplicate group suppression, cleanups, filesystem whiteout support (unionfs), bidir popen(). Notes: svn path=/head/; revision=23668
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-1/+1
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* Don't cast void functions to void.Jeffrey Hsu1995-06-201-2/+2
| | | | | | | Obtained from: NetBSD commit by jtc on June 16, 1995. Notes: svn path=/head/; revision=9272
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8870
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+160
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573