File: daemon_inetd.c

package info (click to toggle)
ganglia-monitor-core 2.5.7-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,300 kB
  • ctags: 3,900
  • sloc: ansic: 27,889; sh: 8,492; makefile: 148
file content (20 lines) | stat: -rw-r--r-- 591 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * @file daemon_inetd.c Functions for inetd daemons
 */
/* $Id: daemon_inetd.c,v 1.2 2002/06/20 03:23:24 massie Exp $ */
#include	"gangliaconf.h"

extern int daemon_proc;		/* defined in error.c */

/**
 * @fn void daemon_inetd (const char *pname, int facility)
 * Initialize a inetd daemon and syslog functions
 * @param pname The name of your program
 * @param facility Specify the type of program logging (man openlog for details)
 */
void
daemon_inetd (const char *pname, int facility)
{
   daemon_proc = 1;		/* for our err_XXX() functions */
   openlog (pname, LOG_PID, facility);
}