/*
* This is a routine to test the system's ability to handle non-blocking I/O.
* This will probably need some augmenting for new systems...
*/
#include "V.h"
#include "sys_fcntl.h"

#ifndef	FNBLOCK
#ifdef O_NONBLOCK	/* This is what Posix calls it */
#define	FNBLOCK	O_NONBLOCK
#else
#ifdef FNDELAY	/* This is what Sun calls it */
#define	FNBLOCK	FNDELAY
#endif
#endif
#endif

main(ac,av)
	char**av;
{	int  f, i, j;
	ac = Vinit(ac,av);
	for (f=0; f<3; f++) {
		i = Fcntl(f,F_SETFL,FNBLOCK);
		V1 "Fcntl(f,F_SETFL,FNBLOCK) gave %d [Err %d=%s]",f,i,Erreason D;
	}
done:
	Exit(errno);
}
