mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 13:22:48 +00:00
Record PID in /var/run/inetd.pid and document same.
This commit is contained in:
parent
234d1b32a8
commit
9fe96cbb6d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11447
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94
|
||||
.\" $Id: inetd.8,v 1.4 1994/12/21 19:08:41 wollman Exp $
|
||||
.\" $Id: inetd.8,v 1.5 1995/10/09 23:34:07 davidg Exp $
|
||||
.\"
|
||||
.Dd April 13, 1994
|
||||
.Dt INETD 8
|
||||
@ -322,6 +322,11 @@ rereads its configuration file when it receives a hangup signal,
|
||||
.Dv SIGHUP .
|
||||
Services may be added, deleted or modified when the configuration file
|
||||
is reread.
|
||||
Except when started in debugging mode,
|
||||
.Nm
|
||||
records its process ID in the file
|
||||
.Pa /var/run/inetd.pid
|
||||
to assist in reconfiguration.
|
||||
.Sh TCPMUX
|
||||
.Pp
|
||||
.Tn RFC 1078
|
||||
@ -347,6 +352,18 @@ causes
|
||||
.Nm inetd
|
||||
to list TCPMUX services in
|
||||
.Pa inetd.conf .
|
||||
.Sh "FILES"
|
||||
.Bl -tag -width /var/run/inetd.pid -compact
|
||||
.It Pa /etc/inetd.conf
|
||||
configuration file.
|
||||
.It Pa /etc/rpc
|
||||
translation of service names to RPC program numbers.
|
||||
.It Pa /etc/services
|
||||
translation of service names to port numbers.
|
||||
.It Pa /var/run/inetd.pid
|
||||
the pid of the currently running
|
||||
.Nm inetd .
|
||||
.El
|
||||
.Sh "EXAMPLES"
|
||||
.Pp
|
||||
Here are several example service entries for the various types of services:
|
||||
@ -406,6 +423,8 @@ The user or group ID for the entry's
|
||||
.Em user
|
||||
is invalid.
|
||||
.Sh SEE ALSO
|
||||
.Xr rpc 5 ,
|
||||
.Xr services 5 ,
|
||||
.Xr comsat 8 ,
|
||||
.Xr fingerd 8 ,
|
||||
.Xr ftpd 8 ,
|
||||
@ -423,7 +442,8 @@ command appeared in
|
||||
.Bx 4.3 .
|
||||
TCPMUX is based on code and documentation by Mark Lottor.
|
||||
Support for
|
||||
.Em Sun-RPC
|
||||
.Tn "ONC RPC"
|
||||
based services is modelled after that
|
||||
provided by
|
||||
.Em SunOS 4.1 .
|
||||
.Tn SunOS
|
||||
4.1.
|
||||
|
@ -40,7 +40,7 @@ static char copyright[] =
|
||||
#ifndef lint
|
||||
/* from: @(#)inetd.c 8.4 (Berkeley) 4/13/94"; */
|
||||
static char inetd_c_rcsid[] =
|
||||
"$Id: inetd.c,v 1.5.2.1 1995/06/05 01:01:19 davidg Exp $";
|
||||
"$Id: inetd.c,v 1.6 1995/06/11 19:32:39 rgrimes Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -296,7 +296,16 @@ main(argc, argv, envp)
|
||||
if (argc > 0)
|
||||
CONFIG = argv[0];
|
||||
if (debug == 0) {
|
||||
FILE *fp;
|
||||
daemon(0, 0);
|
||||
pid = getpid();
|
||||
fp = fopen(_PATH_INETDPID, "w");
|
||||
if (fp) {
|
||||
fprintf(fp, "%ld\n", (long)pid);
|
||||
fclose(fp);
|
||||
} else {
|
||||
syslog(LOG_WARNING, _PATH_INETDPID ": %m");
|
||||
}
|
||||
}
|
||||
memset(&sv, 0, sizeof(sv));
|
||||
sv.sv_mask = SIGBLOCK;
|
||||
|
@ -36,3 +36,4 @@
|
||||
#include <paths.h>
|
||||
|
||||
#define _PATH_INETDCONF "/etc/inetd.conf"
|
||||
#define _PATH_INETDPID _PATH_VARRUN "inetd.pid"
|
||||
|
Loading…
Reference in New Issue
Block a user