projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix typo in man page
[mmh]
/
docs
/
historical
/
mh-6.8.5
/
sbr
/
closefds.c
1
/* closefds.c - close-up fd:s */
2
#ifndef lint
3
static char ident[] = "@(#)$Id: closefds.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
4
#endif /* lint */
5
6
#include "../h/mh.h"
7
#ifndef BSD42
8
#include <stdio.h>
9
#endif /* not BSD42 */
10
11
12
void closefds (i)
13
register int i;
14
{
15
#ifndef BSD42
16
int nbits = _NFILE;
17
#else /* BSD42 */
18
int nbits = getdtablesize ();
19
#endif /* BSD42 */
20
21
for (; i < nbits; i++)
22
#ifdef OVERHEAD
23
if (i != fd_def && i != fd_ctx)
24
#endif /* OVERHEAD */
25
(void) close (i);
26
}