freebsd-skq/usr.sbin
wpaul 7c59df49d9 This commit changes the YPPROC_ALL procecdure so that it handles requests
_without_ using fork().

The problem with YPPROC_ALL is that it transmits an entire map through
a TCP pipe as the result of a single RPC call. First of all, this requires
certain hackery in the XDR filter. Second, if the map being sent is
large, the server can end up spending lots of time in the XDR filter
sending to just the one client, while requests for other clients will
go unanswered.

My original solution for this was to fork() the request into a child
process which terminates after the map has been transmitted (or the
transfer is interrupted due to an error). This leaves the parent free
to handle other requests. But this solution is kind of lame: fork()
is relatively expensive, and we have to keep a cap on the number of
child processes to keep from swamping the system.

What we do now is grab control of the service transport handle and XDR
handle from the RPC library and send the records one at a time ourselves
instead of letting the RPC library do it. We send a record, then go
back to the svc_run() loop and select() on the socket. If select() says
we can still write data, we send the next record. Then we call
svc_getreqset() and handle other RPCs and loop around again. This way,
we can handle other RPCs between records.

We manage multiple YPPROC_ALL requests using a circular queue. When a
request is done, we dequeue it and destroy the handle. We also tag
each request with a ttl which is decremented whevever we run the queue
and a handle isn't serviced. This lets us nuke requests that have sat
idle for too long (if we didn't do this, we might run out of socket
descriptors.)

Now all I have to do is come up with an async resolver, and ypserv
won't need to fork() at all. :)

Note: these changes should not go into 2.2 unless they get a very
throrough shakedown before the final cutoff date.
1996-11-30 22:38:44 +00:00
..
ac Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
accton Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
adduser Don't show on the screen just securely entered password 1996-11-27 22:04:55 +00:00
amd Use LC_TIME=C 1996-11-26 08:53:48 +00:00
apm delete MANDIR=/usr/share/man/man, 1996-05-21 18:09:11 +00:00
apmconf Use /dev/apm instead of /dev/apm0. 1996-03-18 20:35:17 +00:00
arp Update wording of the one message that was in the DIAGNOSTICS section. 1996-11-17 23:25:17 +00:00
bad144 Commit the longstanding bin/410 & kern/411 fix, in the hope that somebody 1995-12-01 11:07:01 +00:00
bootparamd Correct the syntax of the example to reflect reality, and note that the 1996-11-25 01:52:28 +00:00
cdcontrol delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
chown [HISTORY] command appeared in Version 1 AT&T UNIX 1996-08-29 18:06:19 +00:00
chroot Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00
config Bugfix: all device counts >= 256 was broken, they truncated by % 255 1996-08-21 17:00:54 +00:00
cron Add sendmail option '-oi' 1996-11-10 04:46:58 +00:00
crunch Initialize memory obtained by malloc(). 1996-11-16 22:49:02 +00:00
ctm Simplified. Some fts related bugs removed. Made less verbose. The default 1996-11-27 13:06:51 +00:00
dev_mkdb
diskpart Merged type changes and overflow bug fixes from Lite2. 1996-03-19 15:38:44 +00:00
edquota Allow the use of uid ranges when using the "-p" option to allow 1996-03-31 20:57:44 +00:00
fdcontrol Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
fdformat Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
fdwrite Make this more usable from shell scripts and such by adding a non-interactive 1996-09-30 03:10:30 +00:00
inetd Reviewed by: Bill fenner 1996-11-10 21:12:44 +00:00
iostat when you try to run iostat is fails with invalid dk_ndrive 0 1996-11-06 19:43:10 +00:00
IPXrouted Slow down the RIP and SAP broadcasts. At least some NW4.x machines can't 1996-11-24 08:35:23 +00:00
kbdcontrol Implement a -L option that dumps the compiled keymap (as C code) to 1996-11-09 16:16:19 +00:00
kbdmap sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
kernbb Fix various bogosities. 1995-10-22 19:45:28 +00:00
keyadmin This is the `key' program from NRL's IPv6 distribution, heavily 1996-06-17 19:47:57 +00:00
kgmon Implemented non-statistical kernel profiling. This is based on 1995-12-29 15:30:05 +00:00
kvm_mkdb Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00
lpr doc/1987, table heading in error. 1996-11-12 13:37:51 +00:00
lptcontrol Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
manctl export PATH variable 1996-11-04 23:50:58 +00:00
mixer Make mixer print out all of the current mixer settings by defualt 1996-01-31 18:01:22 +00:00
mkdosfs Use the .Fx macro where appropriate. 1996-08-23 00:57:08 +00:00
mount_portalfs Don't use __dead or __pure in user code. They were obfuscations 1996-09-14 03:00:32 +00:00
mountd Add one line fix to stop my old 'don't barf if you see the same 1996-08-29 14:20:57 +00:00
moused Argh! there's no need for moused to be setuid-root! Now that it 1996-09-10 19:17:25 +00:00
mrouted Update to the unreleased mrouted 3.8a . This includes a minor 1996-11-11 03:50:15 +00:00
mtree ts_sec -> tv_sec 1996-09-20 04:13:44 +00:00
named Use LC_TIME=C instead of LC_TIME= 1996-11-26 03:31:26 +00:00
named.reload build bind-4.9.4-P1 named.reload in it's own directory 1996-08-29 21:47:33 +00:00
named.restart build bind-4.9.4-P1 named.restart in it's own directory 1996-08-29 21:48:19 +00:00
ncrcontrol Correct indentation of multi-LUN device info. (Slightly different fix 1996-10-29 19:32:31 +00:00
ndc export PATH variable 1996-11-04 23:57:40 +00:00
newsyslog Doh! Actually read the patch I applied and see what it was *trying* to do, 1996-09-09 15:32:26 +00:00
nfsd Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00
nologin Now that we have a manpage, don't have the 'clean' target be a NO-OP. 1996-07-10 18:36:41 +00:00
nslookup Build bind-4.9.4-P1 nslookup 1996-08-29 21:40:09 +00:00
pccard add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
pciconf Fix core dump after printing usage message (pointed out by BDE). 1996-11-16 22:05:52 +00:00
pcvt Fixed DPADD. 1996-09-05 17:16:10 +00:00
pkg_install Use new ftpGetURL interface, as result, report FTP error 1996-11-14 07:30:17 +00:00
portmap Typo. 1996-02-05 15:35:41 +00:00
ppp typo 1996-11-19 11:08:27 +00:00
pppd Manage UTMP entry if we're doing username/password PAP logins 1996-11-13 01:33:10 +00:00
pppstats Merge pppstats from ppp-2.2 onto mainline.. 1995-10-31 21:41:59 +00:00
pstat Fix a typo, putput --> output. 1996-10-27 23:12:48 +00:00
pwd_mkdb Begin closing out PR #1519 (this requires a change to chpass too, 1996-10-22 03:18:11 +00:00
qcamcontrol Use the .Fx macro where appropriate. 1996-08-23 00:57:08 +00:00
quot Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
quotaon
rarpd Add -s flag to always supply mapping if known, ignoring the 1996-11-27 20:45:10 +00:00
repquota Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
rmt ``make install'' should not install the symlink /usr/sbin/rmt -> /etc/rmt 1996-08-18 11:05:08 +00:00
rndcontrol Use the .Fx macro where appropriate. 1996-08-23 00:57:08 +00:00
rpc.lockd rpc.rstatd -> rpc.lockd typo 1996-08-16 09:44:40 +00:00
rpc.statd Add sm_inter.h to DPSRCS so that make depend is not required to build 1996-07-09 22:40:39 +00:00
rpc.yppasswdd oops, forgot to commit this. the sockaddr_un init code was missing 1996-11-15 15:56:45 +00:00
rpc.ypxfrd Fixed DPADD. 1996-09-05 17:16:10 +00:00
rtprio Use the .Fx macro where appropriate. 1996-08-23 00:57:08 +00:00
rwhod Fix minor buffer problems: 1996-11-01 06:29:34 +00:00
sa delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
sade Change boolean nature of "router" variable since it's not a boolean 1996-11-29 23:52:20 +00:00
sendmail Use LC_TIME=C 1996-11-26 03:41:39 +00:00
sgsc Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
sicontrol Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
sliplogin Close a security hole in sliplogin. 1996-04-24 20:18:25 +00:00
slstat Fixed recently-introduced bugs: 1996-11-04 17:14:43 +00:00
spkrtest sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
spray Fixed DPADD. 1996-09-05 17:16:10 +00:00
stallion rm the files first before uudecoding, because the modes in the begin 1996-05-05 07:40:46 +00:00
sup Oops, don't suppress initial output header (from previous commit), 1996-10-31 00:03:14 +00:00
sysctl Removed references to pathconf-related variables that were never handled 1996-09-28 14:43:03 +00:00
sysinstall Change boolean nature of "router" variable since it's not a boolean 1996-11-29 23:52:20 +00:00
syslogd Don't close f->f_file on F_TTY types on error returns from ttymsg() since 1996-11-26 02:35:08 +00:00
tcpdump Fix typo in last commit...sigh 1996-08-21 21:39:44 +00:00
timed Fixes: 1996-10-22 05:13:42 +00:00
traceroute Grab traceroute out of src/contrib/traceroute 1996-09-30 19:49:54 +00:00
trpt Include queue.h in preparation for struct socket changes. 1996-03-11 13:02:44 +00:00
tzsetup Remove two uninitialized and unused variables that used to cause a 1996-11-19 23:21:52 +00:00
vidcontrol Fix typo. 1996-07-03 22:06:12 +00:00
vipw Implement incremental passwd database updates. This is done by ading a '-u' 1996-07-01 19:38:50 +00:00
vnconfig man page link swapfile.8 -> vnconfig.8 1996-02-02 06:14:09 +00:00
watch Set ${DPADD}, use +=, add $Id$ 1996-09-02 23:38:58 +00:00
wormcontrol Update the man page: the Philips CDD2000 is now supported. 1996-11-06 13:35:27 +00:00
xntpd typo 1996-11-03 12:25:21 +00:00
xten add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
yp_mkdb Add -b and -s flags for adding YP_INTERDOMAIN and YP_SECURE entries to 1996-10-24 14:52:50 +00:00
ypbind delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
yppoll Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
yppush Ack! You can't strdup() a DB datum that is not null terminated, or you 1996-06-09 07:34:27 +00:00
ypserv This commit changes the YPPROC_ALL procecdure so that it handles requests 1996-11-30 22:38:44 +00:00
ypset Add a ypset(8) man page. 1996-02-12 05:28:30 +00:00
zic Merge from vendor branch. We are now completely up-to-date with 1996-07-18 19:59:09 +00:00
Makefile Add pciconf. 1996-10-22 20:58:14 +00:00
Makefile.inc