This is closefds.c in view mode; [Download] [Up]
/* closefds.c - close-up fd:s */
#include "../h/mh.h"
#ifndef BSD42
#include <stdio.h>
#endif not BSD42
void closefds (i)
register int i;
{
#ifndef BSD42
int nbits = _NFILE;
#else BSD42
int nbits = getdtablesize ();
#endif BSD42
for (; i < nbits; i++)
#ifdef OVERHEAD
if (i != fd_def && i != fd_ctx)
#endif OVERHEAD
(void) close (i);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.