1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#DPATCHLEVEL=1
diff -ur inetutils-20030703.old/inetd/inetd.c inetutils-20030703/inetd/inetd.c
--- inetutils-20030703.old/inetd/inetd.c 2002-04-29 21:02:54.000000000 +0000
+++ inetutils-20030703/inetd/inetd.c 2003-08-29 13:36:07.000000000 +0000
@@ -426,6 +426,17 @@
openlog ("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+ {
+ FILE *fp = fopen (PATH_INETDPID, "w");
+ if (fp != NULL)
+ {
+ fprintf (fp, "%d\n", getpid ());
+ (void) fclose (fp);
+ }
+ else
+ syslog (LOG_CRIT, "can't open %s: %s\n", PATH_INETDPID, strerror (errno));
+ }
+
signal_set_handler (SIGALRM, retry);
config (0);
signal_set_handler (SIGHUP, config);
diff -ur inetutils-20030703.old/paths inetutils-20030703/paths
--- inetutils-20030703.old/paths 2001-06-13 16:46:42.000000000 +0000
+++ inetutils-20030703/paths 2003-08-29 13:30:05.000000000 +0000
@@ -82,6 +82,7 @@
PATH_FTPDPID $(localstatedir)/run/ftpd.pid
PATH_INETDCONF $(sysconfdir)/inetd.conf
PATH_INETDDIR $(sysconfdir)/inetd.d
+PATH_INETDPID $(localstatedir)/run/inetd.pid
PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc
PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc
PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc
diff -ur inetutils-20030703.old/inetd/Makefile.am inetutils-20030703/inetd/Makefile.am
--- inetutils-20030703.old/inetd/Makefile.am 2002-04-28 12:09:04.000000000 -0500
+++ inetutils-20030703/inetd/Makefile.am 2003-09-19 18:06:16.000000000 -0500
@@ -12,7 +12,8 @@
@PATHDEFS_MAKE@
-INCLUDES = $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) -I$(top_builddir)/include
+INCLUDES = $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) \
+ $(PATHDEF_INETDPID) -I$(top_builddir)/include
LDADD = -L../libinetutils -linetutils
|