/**************************************************************************
 * LPRng IFHP Filter
 * Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@astart.com>
 *
 * Based on the CTI printer filters.
 *  See COPYRIGHT for details.
 *
 * $Id: fexit.c,v 2.3 1997/12/18 09:48:06 papowell Exp papowell $
 */

#include "portable.h"
#include "hp4.h"
#include "common.h"

void fexit(i)
int i;
{
	/* log(4,"Exit value = %d", i); */
	if ( monitpid > 0 )	{
		/* log(3,"Father murders %d", monitpid); */
		kill(monitpid,SIGTERM);
		kill(monitpid,SIGCONT);
		monitpid = -1;
	}
	if ( accntpid > 0 )	{
		/* log(3,"Father murders %d", accntpid); */
		kill(accntpid,SIGTERM);
		kill(accntpid,SIGCONT);
		accntpid = -1;
	}
	exit(i);
}
