Commit Graph

614 Commits

Author SHA1 Message Date
Jason Evans
51289fd6db Remove cancellation point propagation. 2000-04-26 23:17:17 +00:00
Garrett Wollman
d166947eda Spell MAP_NOSYNC correctly.
Submitted by:	allenc@verinet.com
2000-04-23 15:15:15 +00:00
Garrett Wollman
c1c8bf8375 .Lb-ify 2000-04-23 02:02:33 +00:00
Alexey Zelkin
3dc329d1be Introduce .Lb macro to libutil manpages
Sort .Nm values in some manpages
Remove explicit note about compiling with -lutil, it's implicitly
declared by .Lb macro now.
2000-04-22 16:17:00 +00:00
Alexey Zelkin
d8a7868820 Introduce .Lb macro to libc_r manpages. 2000-04-22 15:50:29 +00:00
Garrett Wollman
5c317306cb Add shm_open(3) and shm_unlink(3). The documentation could use a good
bit of work (and is stylistically probably the worst manual page
I've ever written).
2000-04-22 15:24:29 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Jason Evans
b479399f73 Take care to avoid having "strong" and "weak" symbols of the same name in
libc_r.
2000-03-16 02:14:41 +00:00
Paul Richards
cd7b8d78c7 Fix various unsigned vs signed errors that caused problems with uids
and gids bigger than 16 bits. Added checks for uids and gids that are
bigger than 32 bits.

Approved by:	jkh (partly, this fix is bigger than I first intended)
2000-03-09 18:11:16 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Nik Clayton
3615c24e18 Fix errors in .Xr usage.
PR:             docs/17057
Submitted by:   Submitted by:   Udo Erdelhoff <ue@nathan.ruhr.de>
2000-03-01 10:48:35 +00:00
Ruslan Ermilov
53c698dc2f Restore [no]{s|u}unlnk' and [no]opaque' support.
Broken in src/bin/ls/stat_flags.c,v 1.12.

PR:		16885
Approved by:	jkh
2000-02-22 08:13:07 +00:00
Jason Evans
b0a1b4f809 Add man pages for the sem_*() functions.
Approved by:	jkh
2000-02-16 19:31:53 +00:00
Chris Costello
11400c9ac3 Replace the existing documentation for ``KERN_QUANTUM'' with a more
descriptive (and generally more useful) explanation.
2000-02-10 01:05:21 +00:00
Josef Karthauser
418d67b0d9 Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process.  It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved:	jkh
2000-02-05 18:42:36 +00:00
John Polstra
4e1635fee5 Revive the warning that dllockinit() is experimental and subject to
change.
2000-01-29 01:33:21 +00:00
Bruce Evans
ff246fc369 Install setflags.3 and its link to getflags.3. 2000-01-28 07:14:52 +00:00
Jason Evans
9233c4d942 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
2000-01-27 23:07:25 +00:00
Josef Karthauser
18c0eeddf7 Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'.  As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes:  setmode and getmode.  In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)
2000-01-27 21:17:01 +00:00
Chris Costello
443cb51ff0 Document KERN_QUANTUM under CTL_KERN
PR:		15637
Submitted by:	jhs
2000-01-19 05:32:27 +00:00
Chris Costello
665a0de1a9 Document isnanf() for checking if a float is NaN (``Not-a-Number'') and
create a link from isnanf.3 to isinf.3.

PR:		13878
2000-01-19 04:58:39 +00:00
Mark Murray
c66f4b97e9 This man page is not needed; it just gets jumped on later when libcrypt
is installed.
Submitted by:	bde
2000-01-18 18:25:45 +00:00
Jeroen Ruigrok van der Werven
f014ebf537 Correct placement of $FreeBSD$ CVS identifier. 2000-01-13 14:27:44 +00:00
Jeroen Ruigrok van der Werven
d280290002 Change `from'' to `to''.
PR:		15729
Submitted by:	Kim Toms
2000-01-13 14:26:23 +00:00
Jason Evans
929273386f 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().
2000-01-12 09:23:48 +00:00
John Polstra
7f20578830 Remove the warning that this interface shouldn't be used yet. Fix
a typo.  Clarify a sentence.
2000-01-09 21:01:39 +00:00
Jun-ichiro itojun Hagino
8a3c127000 remove most of PF_INET6 description. add references only.
Suggested by:	Ruslan Ermilov <ru@FreeBSD.org>
2000-01-06 08:58:33 +00:00
Jun-ichiro itojun Hagino
1522ff5b28 bring in description for KAME IPv6 changes.
XXX it looks that sysctl.3 lacks most of PF_INET items.
Reviewed by:	shin
Obtained from:	KAME (netbsd-current)
2000-01-06 03:47:57 +00:00
Bruce Evans
a37e09e423 Fixed the type of dllockinit() (const unpoisoning).
Use long lines instead of lines split with backslash-newline in synopsis.
My synopsis checker doesn't understand backslash-newline.
2000-01-05 19:04:55 +00:00
John Polstra
3600eb76c6 Work around an assert failure in the dynamic linker's default thread
locking functions.  If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker.  This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.

This work-around makes the default locking functions handle recursive
locking.  It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions.  I will implement the correct fix in a future commit.

Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.
1999-12-28 04:38:17 +00:00
John Polstra
d3980376e8 Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker.  This can be called by
threads packages at start-up time.  I will add the call to libc_r
soon.

Also add a default locking method that is used up until dllockinit()
is called.  The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections.  It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).

The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other.  The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen.  This commit fixes it.
1999-12-27 04:44:04 +00:00
Bruce Evans
e395da92c4 Fixed missing installation of a link to ctermid_r.3. 1999-12-23 16:36:48 +00:00
Bruce Evans
79ac896751 Fixed wrong prototype and missing include for strsignal(3). strsignal()
takes an int arg and is prototyped in <string.h>.  It has the opposite
interface botches to psignal(3) which takes a bogus unsigned arg but is
prototyped in the right place.

This is not the last of the interface problems for strsignal().  We
obtained it from NetBSD, but NetBSD has moved its prototype to
<unistd.h>.  strsignal() should return const char *, but it returns
char * for historical reasons.  NetBSD declares it as returning
__aconst char, where __aconst is normally empty but can be set to
`const' to give better error checking.  glibc-2.1.1 prototypes
strsignal() in <string.h>.
1999-12-23 16:29:58 +00:00
Peter Wemm
473ee77f29 Fix the fixfsfile() so that it works for both block and character devices
as root.  This could fix the "filesystem still dirty after fsck" problem.

Submitted by:   bde
1999-12-23 14:44:36 +00:00
Ollivier Robert
aa50282cd1 Fix a bug where a pointer would be one character too far after putting
a '\0' at the end of a string.

Submitted by:	Martin Birgmeier <Martin.Birgmeier@aon.at>
1999-12-21 10:17:36 +00:00
Ollivier Robert
27d5775d8c Rewriting of flags_to_string() and string_to_flags() to use an array.
PR:		bin/3648
Submitted by:	Martin Birgmeier <mbirg@austria.ds.philips.com>
1999-12-19 15:31:24 +00:00
David E. O'Brien
9d6eb14221 Initialize a var to quiet -Wall. 1999-12-18 04:47:43 +00:00
Brian Feldman
1a9b5f474e Switch over to the OpenBSD fts.c, fixing lots of things.
Obtained from:	OpenBSD
1999-12-18 04:36:14 +00:00
Sheldon Hearn
9a602acc36 Replace the -q option to pwd_mkdb with a test for PW_SCAN_BIG_IDS in
the environment.  This allows big ID warnings to be suppressed for
vipw and chpass as well.

Since the environment variable test is only performed for callers
of pw_scan() that do not set pw_big_ids_warning, the test can still
be overriden.  Currently, chpass and pwd_mkdb are the only users
of pw_scan() and neither of them overrides the environment variable
test.
1999-12-02 16:39:15 +00:00
Brian Feldman
226420a464 Separate some common sysctl code into sysctl_find_oid() and calling
thereof.  Also, make the errno returns  _correct_, and add a new one
which is more appropriate.
1999-12-01 02:25:19 +00:00
Alfred Perlstein
8b6c02f328 style fixes, remove extra braces.
readdir_r is not POSIX according to POSIX_SOURCE, bruce says:
> readdir_r() is in the _POSIX_SOURCE section, but is not a POSIX.1-1990
> function.  It's POSIX.1-1996 so it should be under a different feature
> test which we don't support yet.

make sure errno is saved so that its contents are cleared unless
necessary.

Submitted by: bde
1999-11-29 19:12:50 +00:00
Wes Peters
00ecacd3c4 Provide a man page for Alfreds lovely readdir_r function. Also
fixed a minor indentation nit and added a few {}s to make readdir_r
easier on old eyes.
1999-11-29 06:12:22 +00:00
Wes Peters
be728db489 Provide and document ctermid_r function. 1999-11-28 23:28:49 +00:00
Wes Peters
8166f7fd4b Provide the getlogin_r function. 1999-11-28 22:41:38 +00:00
Alfred Perlstein
7285bccf1a add pthread_cancel, obtained from OpenBSD.
eischen (Daniel Eischen) added wrappers to protect against cancled
threads orphaning internal resources.

the cancelability code is still a bit fuzzy but works for test
programs of my own, OpenBSD's and some examples from ORA's books.

add readdir_r to both libc and libc_r

add some 'const' attributes to function parameters

Reviewed by: eischen, jasone
1999-11-28 05:38:13 +00:00
Eivind Eklund
637bc59616 Allow empty UIDs if we are processing NIS records. I am not entirely
happy with how this end up and will re-visit the entire empty field
problem, but this patch solves the NIS problem for now.

Submitted by:	Dan Nelson <dan@emsphone.com>
PR:	14865,14984
1999-11-22 12:42:38 +00:00
Brian Somers
0675e24de0 Make setproctitle(NULL) restore all of the original arguments
(if it's able).
1999-11-17 21:12:17 +00:00
Poul-Henning Kamp
b9df5231ca Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.

To disable this facility and revert to previous behaviour:
        sysctl -w kern.ps_arg_cache_limit=0

For full details see the current@FreeBSD.org mail-archives.
1999-11-16 20:31:58 +00:00
Sheldon Hearn
18138b08d8 Add to pwd_mkdb a -q option to silence warnings about large IDs. Add a
suitably ominous warning in the manual page.

The diff applied is not the one provided in the attributed PR.

PR:		13344
Reviewed by:	bde
1999-11-15 16:45:37 +00:00