#
552311f4 |
| 17-Jul-2013 |
Xin LI <delphij@FreeBSD.org> |
IFC @253398
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|
Revision tags: release/8.4.0 |
|
#
e9dec775 |
| 20-May-2013 |
Jilles Tjoelker <jilles@FreeBSD.org> |
popen(): Add 'e' mode character to set close-on-exec on the new fd.
If 'e' is used, the kernel must support the recently added pipe2() system call.
The use of pipe2() with O_CLOEXEC also fixes race
popen(): Add 'e' mode character to set close-on-exec on the new fd.
If 'e' is used, the kernel must support the recently added pipe2() system call.
The use of pipe2() with O_CLOEXEC also fixes race conditions between concurrent popen() calls from different threads, even if the close-on-exec flag on the fd of the returned FILE is later cleared (because popen() closes all file descriptors from earlier popen() calls in the child process). Therefore, this approach should be used in all cases when pipe2() can be assumed present.
The old version of popen() rejects "re" and "we" but treats "r+e" like "r+".
show more ...
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0 |
|
#
10b3b545 |
| 17-Sep-2009 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Merge from head
|
#
7e857dd1 |
| 12-Jun-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
3d98b75b |
| 27-May-2009 |
Ed Schouten <ed@FreeBSD.org> |
Rename the queue macros I introduced last year.
Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove entries behind an element in the list, using O(1) time. I recently discovered Ne
Rename the queue macros I introduced last year.
Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove entries behind an element in the list, using O(1) time. I recently discovered NetBSD also has a similar macro, called SLIST_REMOVE_AFTER. In my opinion this approach is a lot better:
- It doesn't have the unused first argument of the list pointer. I added this, mainly because OpenBSD also had it.
- The _AFTER suffix makes a lot more sense, because it is related to SLIST_INSERT_AFTER. _NEXT is only used to iterate through the list.
The reason why I want to rename this now, is to make sure we don't release a major version with the badly named macros.
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
7e7f7ca3 |
| 29-Jul-2008 |
Ed Schouten <ed@FreeBSD.org> |
Convert popen()'s `pidlist' to a SLIST, for consistency.
I guess the original author of the popen() code didn't want to use our <sys/queue.h> macro's, because the single linked list macro's didn't o
Convert popen()'s `pidlist' to a SLIST, for consistency.
I guess the original author of the popen() code didn't want to use our <sys/queue.h> macro's, because the single linked list macro's didn't offer O(1) deletion. Because I introduced SLIST_REMOVE_NEXT() some time ago, we can now use the macro's here.
By converting the code to an SLIST, it is more consistent with other parts of the C library and the operating system.
Reviewed by: csjp Approved by: philip (mentor, implicit)
show more ...
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
c879ae35 |
| 09-Jan-2007 |
Warner Losh <imp@FreeBSD.org> |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0 |
|
#
a97ab40a |
| 04-Jan-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Remove unused variable: omask.
|
#
77e2381a |
| 03-Jan-2003 |
Tim J. Robbins <tjr@FreeBSD.org> |
Protect pidlist with a mutex to avoid a race causing a duplicate free() when the same pipe FILE is pclosed()'d in different threads, and to avoid corrupting the linked list when adding or removing it
Protect pidlist with a mutex to avoid a race causing a duplicate free() when the same pipe FILE is pclosed()'d in different threads, and to avoid corrupting the linked list when adding or removing items. The symptoms of the linked list getting corrupted were pclose() either not finding the pipe on the list, or the list becoming circular and pclose() looping infinitely.
show more ...
|
Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs |
|
#
22626efa |
| 01-Feb-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
* Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
d201fe46 |
| 24-Jan-2001 |
Daniel Eischen <deischen@FreeBSD.org> |
Remove _THREAD_SAFE and make libc thread-safe by default by adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will
Remove _THREAD_SAFE and make libc thread-safe by default by adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in.
Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo
Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo.
Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible.
Remove uneeded includes of <errno.h> from a few files.
Add $FreeBSD$ to a few files in order to pass commitprep.
Approved by: -arch
show more ...
|
Revision tags: release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs |
|
#
9233c4d9 |
| 28-Jan-2000 |
Jason Evans <jasone@FreeBSD.org> |
Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(), just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcomin
Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(), 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
show more ...
|
#
92927338 |
| 12-Jan-2000 |
Jason Evans <jasone@FreeBSD.org> |
Add three-tier symbol naming in support of POSIX thread cancellation points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For s
Add three-tier symbol naming in support of POSIX thread cancellation 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().
show more ...
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs, release/3.2.0, release/3.1.0, release/3.0.0, release/2.2.8 |
|
#
26c51fb4 |
| 15-Oct-1998 |
Mike Smith <msmith@FreeBSD.org> |
Conform to POSIX and close any copies of popen() descriptors inherited by a popen()ed child.
PR: misc/7810 Submitted by: Wayne Scott <wscott@ichips.intel.com>
|
#
0c372549 |
| 11-Oct-1998 |
Peter Wemm <peter@FreeBSD.org> |
Avoid the need for calling functions that malloc after a vfork().
|
#
0890dc6f |
| 10-Oct-1998 |
Bruce Evans <bde@FreeBSD.org> |
vfork -> fork. The child calls execl() which calls malloc(), so 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
vfork -> fork. The child calls execl() which calls malloc(), so 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.
show more ...
|
Revision tags: release/2.2.7, release/2.2.6, release/2.2.5_cvs, release/2.2.2_cvs |
|
#
2b9ac168 |
| 22-Apr-1997 |
Bruce Evans <bde@FreeBSD.org> |
FIxed the cleanup. I forgot to leave stdin alone in the usual (!twoway) case.
|
#
5ae9116a |
| 20-Apr-1997 |
John Dyson <dyson@FreeBSD.org> |
Clean-up my modification of popen.c for vfork. Bruce's (this) is better. Submitted by: Bruce Evans <bde@freebsd.org>
|
#
1174d9f9 |
| 16-Apr-1997 |
John Dyson <dyson@FreeBSD.org> |
Fix the problem in popen that makes correct vfork semantics fail. 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 sp
Fix the problem in popen that makes correct vfork semantics fail. 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.)
show more ...
|
Revision tags: release/2.2.1_cvs, release/2.2.0 |
|
#
035e5608 |
| 11-Mar-1997 |
Bruce Evans <bde@FreeBSD.org> |
Fixed cleaning up after malloc failure, which was broken by Lite2.
We don't use socketpair(), so don't #include <sys/socket.h>.
Restored some gcc-quieting parentheses that were lost in the Lite2 me
Fixed cleaning up after malloc failure, which was broken by Lite2.
We don't use socketpair(), so don't #include <sys/socket.h>.
Restored some gcc-quieting parentheses that were lost in the Lite2 merge.
show more ...
|
#
adf6ad9e |
| 11-Mar-1997 |
Peter Wemm <peter@FreeBSD.org> |
Merge from Lite2: filesystem include updates, duplicate group suppression, cleanups, filesystem whiteout support (unionfs), bidir popen().
|
#
662909a7 |
| 11-Mar-1997 |
Peter Wemm <peter@FreeBSD.org> |
Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch
|
Revision tags: release/2.1.7_cvs, release/2.1.6_cvs, release/2.1.6.1, release/2.1.5_cvs |
|
#
51295a4d |
| 12-Jul-1996 |
Jordan K. Hubbard <jkh@FreeBSD.org> |
General -Wall warning cleanup, part I. Submitted-By: Kent Vander Velden <graphix@iastate.edu>
|
Revision tags: release/2.1.0_cvs |
|
#
e78bad23 |
| 20-Jun-1995 |
Jeffrey Hsu <hsu@FreeBSD.org> |
Don't cast void functions to void. Obtained from: NetBSD commit by jtc on June 16, 1995.
|