Commit Graph

335 Commits

Author SHA1 Message Date
Andrey A. Chernov
fa23b4efb8 Change to reflect -current sleep implementation reality 1997-08-12 16:46:05 +00:00
Andrey A. Chernov
d23cc31d85 Make itimerfix hack better: return the time we can't sleep at once 1997-08-12 15:46:05 +00:00
Joerg Wunsch
ac77b4810d Hack^H^H^H^Hworkaround for itimerfix(9) gratuitously limiting the
acceptable range for tv_sec to the magic number 100000000 (which at
least ought to be declared in a header file, and explained in the
non-existing man page, as well as in the existing man pages for
nanosleep(2) & Co.).

PR:		bin/4259
1997-08-10 12:16:13 +00:00
Steve Price
febad2fcf4 Observe precedence set by Phillippe Charnier in adding an
rcsid.
1997-08-07 22:28:25 +00:00
Steve Price
d46c1a60d3 Remove #if(n)def BSD_4_4_LITE cruft and sccsid -> rcsid. 1997-08-07 15:33:50 +00:00
Peter Wemm
925d069aa8 Make sleep() and usleep() "eat" any stray SIGALRM signals during the
lifetime of the call, just like the old implementation did.  Previously,
we were only eating them if the application did not call sleep()/usleep()
with SIGALRM masked.

Submitted by:	ache
1997-07-18 09:48:37 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Peter Wemm
dd1d7d1fa0 Add a quick description of sysctlbyname() and link sysctl.3 to
sysctlbyname.3
1997-07-12 11:16:18 +00:00
Peter Wemm
16373facf6 Have sysctlbyname() take a const first arg (the ascii string) 1997-07-12 11:14:30 +00:00
Bruce Evans
362c392f0b This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
1997-07-03 03:28:27 +00:00
Bruce Evans
5500fdcd4f Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet.  All affected files except 3
unimportant ones have already left the vendor branch.
1997-07-03 03:28:27 +00:00
Jordan K. Hubbard
51e6986086 _err() -> err(). 1997-06-29 00:33:17 +00:00
Mike Smith
4ce2d5b5b5 Add stringlist functions from NetBSD. (required for the new ftp(1)
Obtained from:	NetBSD
1997-06-25 08:05:03 +00:00
John Hay
127feebec1 Add tickadj to struct clockinfo, like NetBSD and OpenBSD. 1997-06-24 18:22:44 +00:00
Steve Price
681e5e7a09 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
Andrey A. Chernov
e9c3c2bc0b Change u_char which require special include to unsigned char 1997-06-14 01:28:59 +00:00
Andrey A. Chernov
83a03b388f Add arc4random() functions from OpenBSD. They are almost same as our
srandomdev(), but can be used inside libraries. random() can't be used
inside libraries because it breaks its possible predictable sequence.
arc4random() is true random as designed, so its usage is library-safe.
Obtained from: OpenBSD
1997-06-14 01:15:41 +00:00
Andrey A. Chernov
e728d480d2 Style optimization in newly added POSIX range []] conformance, redo
'for' loop as do...while and remove variable unneded now
1997-06-07 01:33:10 +00:00
Andrey A. Chernov
05a068e60e Add missing FNM_PERIOD check for '[' range
Don't treat !^ as first characters in the range, just as negate sign
[/] never match if FNM_PATHNAME
1997-06-06 22:33:28 +00:00
Andrey A. Chernov
e2dbbd9eea 1) Now conforms POSIX.2 2.8.3.2 requirements about []] pattern
2) Treat unclosed [ range in pattern as regular characters (bash style)
1997-06-06 21:48:55 +00:00
Peter Wemm
be159dcaf7 Re-activate the nanosleep style using code, but with the signal handling
semantics of the old sleep for compatability with a few decades of expected
side effects.  Apache breaks if we just use nanosleep() for some reason,
here we use a new signanosleep() syscall which is kinda like a hybrid of
sigsuspend and nanosleep..

Reviewed by:  ache (and tested on his apache that was failing when
                    sleep used plain nanosleep)
1997-06-02 16:30:22 +00:00
Julian Elischer
50dab48a5b Submitted by: Whistle Communications (archie Cobbs)
These changes add the ability to specify that a UFS file/directory
cannot be unlinked. This is basically a scaled back version
of the IMMUTABLE flag. The reason is to allow an administrator
to create a directory hierarchy that a group of users
can arbitrarily add/delete files from, but that the hierarchy
itself is safe from removal by them.
If the NOUNLINK definition is set to 0
then this results in no change to what happens normally.
(and results in identical binary (in the kernel)).
It can be proven that if this bit is never set by the admin,
no new behaviour is introduced..
Several "good idea" comments from reviewers plus one grumble
about creeping featurism.

This code is in production in 2.2 based systems
1997-06-02 06:24:52 +00:00
Peter Wemm
0913e7ce8b Update the sleep(3)/usleep(3) code to use signanosleep(2) if compiled with
-DUSE_NANOSLEEP.  Also, seperate the code for _THREAD_SAFE so that it uses
the simpler threaded nanosleep() call in libc_r..  We don't go to the same
extremes for emulating traditional sleep semantics (ie: eating any SIGALRM
that might happen) which things like apache seem to depend on.
1997-06-01 09:27:03 +00:00
Poul-Henning Kamp
f3877f2e4e sysctlbyname allows acces to sysctl variables by name.
The manpage has been sent to linquistic decontamination and will arrive
when released from the quarantine

Reviewed by:	peter
1997-05-30 20:53:13 +00:00
Peter Wemm
304e0890fc Update the nanosleep versions to set a SIGALRM handler while sleeping.
This appears to appease Apache, although depending on having sleep(3)
changing the SIGALRM handler is a bit bogus.
1997-05-18 10:57:49 +00:00
Peter Wemm
1823941071 if nanosleep returns too early, loop. usleep() does not have a return
value, it appears as though the semantics of usleep are that it doesn't
return early.  (only in the nanosleep code - the setitimer code does this
already)
1997-05-17 15:42:58 +00:00
Peter Wemm
7bf1f2c9fa round-up non-zero nanoseconds in #ifdef'ed code. 1997-05-17 15:41:08 +00:00
Peter Wemm
fa0f63238b Allow conditional use (add -DUSE_NANOSLEEP) to CFLAGS of nanosleep() for
the backend of sleep(3) and usleep(3).  It's off by default until the
problem is fixed.
1997-05-17 11:40:58 +00:00
Andrey A. Chernov
e3c1328e9f Temporarily restore old (itimer) sleep variant because new one
(nanosleep) breaks Apache httpd badly: his childs died quickly after
number of requests (SIGPIPE). To reproduce this bug start
gdb /usr/local/sbin/httpd
run -X

and make some bunch of concurent requests (load the server pages
from 3 different places f.e.)
After short time httpd dies via SIGPIPE. It never dies with old sleep.c

In real life it looks like lots of broken images on the pages or missing
pages. Lynx says about Network read error, etc.
It seems something wrong in nanosleep signal handling.
1997-05-17 08:32:42 +00:00
Peter Wemm
511d7b9c07 Use nanosleep() in all cases, not just in the reentrant libc (_THREAD_SAFE)
version.
1997-05-12 10:04:57 +00:00
David Nugent
210793f753 Add #include <sys/types.h> in synopsis, now required for libutil.h. 1997-05-11 08:50:33 +00:00
Eivind Eklund
f756433e8b Back out all of yesterdays include file changes. 1997-05-07 20:01:10 +00:00
Eivind Eklund
48ea0bec18 Make a lot of include-files self-contained. I excluded the patches changing
int's to gid_t and uid_t - should I commit these, too?

Closes PR misc/2625.

Submitted by:	Julian Assange <proff@iq.org>
1997-05-07 02:27:18 +00:00
John Birrell
870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
John Birrell
cd6f28f252 This stub has not been required by libc for a long time. Nuke it. 1997-05-03 02:47:52 +00:00
John Polstra
298c8e3d6b Fix a bug that caused some false mismatches when both FNM_PATHNAME
and FNM_LEADING_DIR were specified and the pattern ended with "*".
Example: pattern="src/usr.sbin/w*", string="src/usr.sbin/watch/watch.8,v".
This should match, but did not.
1997-04-29 03:24:57 +00:00
Bruce Evans
2b9ac168ec FIxed the cleanup. I forgot to leave stdin alone in the usual (!twoway)
case.
1997-04-22 09:44:06 +00:00
John Dyson
5ae9116a7d Clean-up my modification of popen.c for vfork. Bruce's (this) is better.
Submitted by:	Bruce Evans <bde@freebsd.org>
1997-04-20 20:17:04 +00:00
Bruce Evans
a3315650db Fixed #include and/or prototype bugs in synopsis. 1997-04-19 15:57:20 +00:00
Daniel O'Callaghan
a6f96c4131 Fix punctuation: "it's" -> "its" 1997-04-17 23:31:47 +00:00
John Dyson
1174d9f9df 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.)
1997-04-16 03:26:50 +00:00
Bruce Evans
69b10155b5 Fixed another prototype bug in synopsis. 1997-04-14 13:37:18 +00:00
David Nugent
5afcddae37 Fix typo. 1997-04-13 16:55:56 +00:00
David Nugent
b06ebb3255 Implement two new keywords and status flags for entries in /etc/ttys;
TTY_NETWORK (network), TTY_DIALUP (dialup), which determine a basic
connection type. TTY_DIALUP in particular will replace the old out of
date heuristic "tty[dD]*" in login.c (and better than the current
hard-coded method).
1997-04-13 15:16:03 +00:00
David Nugent
c8207e03ba Add MLINKS for isdialuptty(3) & isnetworktty(3). 1997-04-13 15:12:14 +00:00
Bruce Evans
08398af376 Fixed #include and/or prototype bugs in synopsis. 1997-04-13 13:16:20 +00:00
Mike Pritchard
b0b21f924b Typo police. Part of PR# 3242.
Submitted by:	Philippe Charnier <charnier@xp11.frmug.org>
1997-04-09 23:05:04 +00:00
Andrey A. Chernov
21d58869ce Speedup in case locale not used 1997-04-04 19:16:08 +00:00
Andrey A. Chernov
6a575f6e24 Eliminate some function calls when locale not used 1997-04-04 19:08:19 +00:00
Andrey A. Chernov
5058254947 Speedup in case locale not used 1997-04-04 18:44:19 +00:00