aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* Correct check for invalid semaphore on sem_destroy() (s/==/!=/).Daniel Eischen2004-02-051-1/+1
| | | | | | | Reported by: kris Notes: svn path=/head/; revision=125509
* Correct the weak reference for sem_unlink.Daniel Eischen2004-02-051-1/+1
| | | | Notes: svn path=/head/; revision=125502
* Allow libc's version of sem_trywait() to work for non-pshared mutexes.Daniel Eischen2004-02-041-2/+17
| | | | Notes: svn path=/head/; revision=125446
* Modify the implementation of libc semaphores so that they can beDaniel Eischen2004-02-031-146/+132
| | | | | | | | | | | | | | | overridden by the threads library to provide a userland version of non-pshared semaphores and cancellation points. Also add a sem_timedwait(). The libc version of semaphores always uses kernel semaphores regardless of whether pshared is set or not. When threads are not present, it is difficult to get sem_wait() or sem_timedwait() to do the right thing (since pthread_cond_timedwait() and pthread_cond_wait() are stubs in libc and just return immediately). Notes: svn path=/head/; revision=125372
* Discard the first 1024 bytes of output as suggested byDavid Schultz2004-01-201-1/+13
| | | | | | | | | | | http://citeseer.nj.nec.com/fluhrer01weaknesses.html and http://citeseer.nj.nec.com/531224.html . PR: 61126 Submitted by: Jeff Ito <jeffi@rcn.com> Notes: svn path=/head/; revision=124741
* add missing endusershell() call. Original version was incorrect.Philippe Charnier2004-01-181-1/+3
| | | | | | | | PR: bin/2442 Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de> Notes: svn path=/head/; revision=124690
* Backout revision 1.6, because some stub functions not in libc, andDavid Xu2004-01-171-18/+2
| | | | | | | | non-threaded won't build. The cancellation point support should be further discussed. Notes: svn path=/head/; revision=124614
* Enable cancellation point in sem_wait, it is required by POSIX.David Xu2004-01-171-2/+18
| | | | | | | | | For pshared semaphore, this commit still does not enable cancellation point, I think there should be a pthread_enter_cancellation_point_np for libc to implement a safe cancellation point. Notes: svn path=/head/; revision=124605
* Fixed style of previous commit.Ruslan Ermilov2004-01-151-3/+2
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=124568
* - libc/sys/sem.c was repocopied to libc/gen/sem.c.Ruslan Ermilov2004-01-147-8/+13
| | | | | | | | | | - sem_*(3) manpages were repocopied from libc_r. Reviewed by: deischen Repocopy by: markm Notes: svn path=/head/; revision=124530
* Kill whitespace at end of lines.Jacques Vidrine2004-01-121-9/+9
| | | | Notes: svn path=/head/; revision=124432
* Fix a bug that could result in a null pointer dereference inJacques Vidrine2004-01-121-1/+1
| | | | | | | | | | | | | | getpwent(3) or getpwuid(3) when using NIS adjunct maps. The bug was present in the internal `nis_passwd' function. The lookup in the adjunct map used the name passed into `nis_passwd', however no name was of course supplied by getpwent or getpwuid. Correctly use the name from the `struct pwd' that was found instead. PR: bin/59962 Submitted by: Gabriel Gomez <ggomez@fing.edu.uy> Notes: svn path=/head/; revision=124431
* Remove unused variables and function declarations. Add missing headers.Jacques Vidrine2004-01-061-3/+0
| | | | Notes: svn path=/head/; revision=124174
* Make sure we initialise dirp->dd_size if we aren't reading a unionfsDoug Rabson2003-12-261-0/+1
| | | | | | | | | directory. Special thanks to: valgrind Notes: svn path=/head/; revision=123861
* Back out previous commit due to incorrect content.Tom Rhodes2003-12-231-128/+62
| | | | | | | Noticed by: wollman Notes: svn path=/head/; revision=123780
* Document many of the missing posix.1b options.Tom Rhodes2003-12-231-62/+128
| | | | | | | | | PR: 20528 Submitted by: bms (original version) Requested by: mike (awhile ago) Notes: svn path=/head/; revision=123773
* Fix problem where initgroups would silently truncate groups withDiomidis Spinellis2003-11-191-2/+7
| | | | | | | | | | more than NGROUP elements without providing the opportunity to setgroups to fail and correctly return error and set errno. MFC after: 2 weeks Notes: svn path=/head/; revision=122899
* Remove ',' accidentally added after ".Xr fork 2".Guy Helmer2003-11-101-1/+1
| | | | Notes: svn path=/head/; revision=122443
* Prevent abnormal termination of a child daemon process when createdGuy Helmer2003-11-102-3/+35
| | | | | | | | | | | | | by a parent that is a session leader (e.g., login shell) by ignoring SIGHUP in before calling fork(2) and then restoring SIGHUP's action after setsid(3). Based on the patch by Martin Kammerhofer <mkamm@gmx.net>. PR: bin/25462 Reviewed by: bde, alex.neyman@auriga.ru Notes: svn path=/head/; revision=122442
* Rephrase .Nd description to contain the keyTim Kientzle2003-11-061-1/+1
| | | | | | | | | | words "pattern" and "test"; this should make it easier to find with "man -k" Approved by: gordon (mentor) Notes: svn path=/head/; revision=122155
* Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree.Poul-Henning Kamp2003-10-302-2/+3
| | | | Notes: svn path=/head/; revision=121737
* Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magicPoul-Henning Kamp2003-10-302-2/+7
| | | | | | | characters '*', '?' and '['. Notes: svn path=/head/; revision=121728
* Remove incomplete support for running FreeBSD userland on old NetBSD kernelsTim J. Robbins2003-10-294-14/+1
| | | | | | | lacking the issetugid() and utrace() syscalls. Notes: svn path=/head/; revision=121667
* mdoc(7): Fix common mistakes made in the SEE ALSO section.Ruslan Ermilov2003-09-121-1/+1
| | | | Notes: svn path=/head/; revision=120010
* mdoc(7): Properly mark C headers.Ruslan Ermilov2003-09-104-5/+5
| | | | Notes: svn path=/head/; revision=119964
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-0817-30/+30
| | | | Notes: svn path=/head/; revision=119893
* Update the kern.osreldate documentation to document the present formatEivind Eklund2003-09-011-2/+17
| | | | | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru Notes: svn path=/head/; revision=119654
* Add a kluge suggested by Marcel to paper over the difference betweenGarrett Wollman2003-08-191-0/+3
| | | | | | | | | | | | | | | gethostname()'s old and new signatures without requiring a library bump. Note that programs which called gethostname() with a negative argument were already broken, since the same type conversion was done by the old implementation. Add a note in the Makefile so that whoever next bumps the libc revision will delete the kluge at the same time (as it will no longer be necessary). This is only operative on 64-bit platforms. Submitted by: marcel Notes: svn path=/head/; revision=119151
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMGarrett Wollman2003-08-192-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the buffer is not long enough to hold the current host name. POSIX does not standardize error returns for gethostname(), so it doesn't matter which one we use, but ENAMETOOLONG is at least a little more intuitive, and mi suggests the existence of prior art. I've been running with this change for a while on my home machine with no effect. At the same time, I've updated the prototype for gethostname() to use the correct standard type (size_t) for the namelen argument. All of the in-tree callers fall into one of the following categories: 1) Call perror() or equivalent when gethostname() fails. 2) Ignore gethostname()'s return value entirely, potentially resulting in data corruption if the buffer is too small. 3) Fall back to a (possibly sensible) default value if gethostname() fails. Many of the callers I examined shows signs of confusion about the correct sizing of the host name buffer. gethostname(3) now has more information about this, as well as updated standards information. PR: 48114 Submitted by: mi (in part) Notes: svn path=/head/; revision=119140
* Add the POSIX 1003.1-2001 posix_madvise() interface.Bruce M Simpson2003-08-092-3/+4
| | | | | | | | | PR: standards/54634 Reviewed by: das Approved by: jake (mentor) Notes: svn path=/head/; revision=118684
* The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1.David Schultz2003-07-311-2/+4
| | | | Notes: svn path=/head/; revision=118247
* Make raise and _raise as weak symbols, so they can be overriden byDavid Xu2003-07-191-1/+4
| | | | | | | | | thread library. Reviewed by: deischen Notes: svn path=/head/; revision=117757
* Rewrite to reflect slight change in semantics for C99, and note a bugGarrett Wollman2003-07-191-22/+39
| | | | | | | in the standard. Defer to gettimeofday(2) for error indications. Notes: svn path=/head/; revision=117754
* C99 compliance: time() always sets its return value in both placesGarrett Wollman2003-07-191-4/+7
| | | | | | | | | (if present), even on error. Pointed out by: Wojtek Lerch, on the Austin Group mailing-list Notes: svn path=/head/; revision=117753
* Revert to using yp_order() to probe for master.paswd.by* maps andBill Paul2003-07-181-7/+14
| | | | | | | | | | | | | | | | | | don't probe the server at all for passwd.by* maps. This fixes interoperability with the Services For UNIX NIS server (which is really a front end to Captive^WActiveDirectory). This server incorrectly returns success for all YPPROC_MASTER requests, even for maps that don't exist, which makes it impossible to (ab)use it to probe for the existence of the master.passwd.by* maps. This is a little kludgey, but basically restores the original behavior of getpwent.c as it is in -stable, and works around both the lack of YPPROC_ORDER on NIS+ servers as well as the broken YPPROC_MASTER on Services For UNIX servers. Notes: svn path=/head/; revision=117750
* Whitespace after keywords per style(9).Garrett Wollman2003-07-181-2/+2
| | | | Notes: svn path=/head/; revision=117735
* With the latest mdoc(7), we can now fix the synopsis like this.Ruslan Ermilov2003-07-031-3/+9
| | | | | | | Desired by: bde Notes: svn path=/head/; revision=117204
* Fixed some style bugs.Bruce Evans2003-07-011-6/+7
| | | | Notes: svn path=/head/; revision=117111
* Don't segfault if setproctitle(3) is called with NULL initially.Alfred Perlstein2003-07-011-0/+1
| | | | | | | | | | | The old buffer was not being initialized and a later str*() op on it would cause a crash if it wasn't initialized by a previous call to setproctitle(3) with an actual string. Noticed by: Ashley Penney <ashp@unloved.org> Notes: svn path=/head/; revision=117102
* Add a libc function execvP that takes the search path as an arguement.Gordon Tetlow2003-06-292-15/+40
| | | | | | | | | | | Change execvp to be a wrapper around execvP. This is necessary for some of the /rescue pieces. It may also be more generally applicable as well. Submitted by: Tim Kientzle <kientzle@acm.org> Approved by: Silence on arch@ Notes: svn path=/head/; revision=117030
* Teach fmtcheck(3) about the flags a, A, F, G, t, and z.David Schultz2003-06-291-8/+28
| | | | Notes: svn path=/head/; revision=117014
* fix NIS+ YP compat modeJohn W. De Boskey2003-06-271-3/+4
| | | | | | | | PR: bin/52792 Submitted by: TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp> Notes: svn path=/head/; revision=116901
* Don't statically initialize buf to _PATH_DEV, _PATH_DEV always copied toAndrey A. Chernov2003-06-241-1/+1
| | | | | | | it in any case. Notes: svn path=/head/; revision=116797
* Supplement the cross-references section with those to sigpending(2)Yaroslav Tykhiy2003-06-241-0/+2
| | | | | | | | and sigprocmask(2). These two syscalls are likely to be accompanied by a few sigsetops(3) in a typical piece of code. Notes: svn path=/head/; revision=116785
* ttyname(3) must return absolute pathnames.Poul-Henning Kamp2003-06-211-2/+8
| | | | | | | Noticed by: kris Notes: svn path=/head/; revision=116651
* Use devname(3) to do the task.Poul-Henning Kamp2003-06-201-66/+2
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=116636
* Add devname_r(3) which takes a buffer as argument.Poul-Henning Kamp2003-06-202-56/+21
| | | | Notes: svn path=/head/; revision=116610
* Make the execle() synopsis look (again) like a normal C prototype.Ruslan Ermilov2003-06-181-3/+3
| | | | | | | | | | | | Also fixed the rest of ell (list) functions prototypes to include a (commented out) terminating null pointer. Pointed out by: bde Obtained from: POSIX.1-2001 Glanced at by: imp Notes: svn path=/head/; revision=116537
* Fix the execle(3) synopsis to include the environment pointer.Poul-Henning Kamp2003-06-171-1/+1
| | | | | | | Confused: anordby Notes: svn path=/head/; revision=116471
* The .Fn functionPhilippe Charnier2003-06-081-3/+6
| | | | Notes: svn path=/head/; revision=116025