/*
 * This code is part of Screws project.
 * Copylefted by pancake@phreaker.net at 2003
 */

#include "main.h"
#include "Signal.h"

bool
IO_direct(s,n,head)
	int s; /* socket */
	int n; /* what */
	char **head; /* head array */
{
	close(0); dup2(s,1); /* stdin  */
	close(1); dup2(s,1); /* stdout */

	/* Exec Timeout */
	if (!Svr.notimeout)
		catchTimeout(	getpid(),
				Svr.Lis[n].V[_EXECTIMEOUT],
				ALARM_KILL);
	doExec(s,n,head);
}
