* Copyright (c) 1989 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Rick Macklem at The University of Guelph.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
"@(#) Copyright (c) 1989 Regents of the University of California.\n\
static char sccsid
[] = "@(#)nfsiod.c 5.2 (Berkeley) %G%";
* Nfsiod does asynchronous buffered I/O on behalf of the NFS client.
* It does not have to be running for correct operation, but will improve
* throughput. The one optional argument is the number of children to fork.
(void) open("/", O_RDONLY
);
{ int tt
= open("/dev/tty", O_RDWR
);
ioctl(tt
, TIOCNOTTY
, (char *)0);
signal(SIGTSTP
, SIG_IGN
);
signal(SIGTTIN
, SIG_IGN
);
signal(SIGTTOU
, SIG_IGN
);
signal(SIGQUIT
, SIG_IGN
);
signal(SIGTERM
, SIG_IGN
);
if (argc
!= 2 || (cnt
= atoi(argv
[1])) <= 0 || cnt
> 20)
for (i
= 1; i
< cnt
; i
++)
async_daemon(); /* Never returns */