ftp.nice.ch/pub/next/tools/ups/upsdeamon.N.bs.tar.gz#/upsd/ups_folder/main.c

This is main.c in view mode; [Download] [Up]

/*
**	m a i n . c
**
**	main program for UPS monitor daemon
**
**	Arthur W. Neilson III
**	art@pilikia.pegasus.com
**	Sat Mar 30 1991
*/

#include "common.h"

/* default tuneables */
char   *ups_port = UPS_PORT;
char   *ups_shut = UPS_SHUT;
char   *ups_log = UPS_LOG;
char   *ups_fail = UPS_FAIL;
char   *ups_rest = UPS_REST;
int     ups_time = UPS_TIME;
int	interval = UPS_INTERVAL;
int	state = UPS_LINE;

/* global descriptors */
int     ups_fd;
int     log_fd;

main(argc, argv)
int     argc;
char   *argv[];
{
	void    getvars();
	void    getoptions();
	void    chkoptions();
	void    mkdaemon();

	getvars();		/* retrieve environment vars */
	getoptions(argc, argv);	/* process command line options */
	chkoptions();		/* validate command line options */
	mkdaemon();		/* fork daemon process */
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.