You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
--- tftpd/tftpd.c.orig 2003-01-31 03:22:33.000000000 +0100 |
|
+++ tftpd/tftpd.c 2003-04-11 09:19:35.000000000 +0200 |
|
@@ -477,6 +477,22 @@ |
|
setsid(); |
|
#endif |
|
#endif |
|
+#ifdef PID_FILE |
|
+ /* Write PID file */ |
|
+ { |
|
+ mode_t old_umask; |
|
+ pid_t pid; |
|
+ FILE *fp; |
|
+ |
|
+ old_umask = umask((mode_t) 0022); |
|
+ pid = getpid(); |
|
+ if ((fp = fopen(PID_FILE, "w")) == NULL) |
|
+ syslog(LOG_ERR, "cannot write PID file '%s'", PID_FILE); |
|
+ fprintf(fp, "%ld\n", (long)pid); |
|
+ fclose(fp); |
|
+ umask(old_umask); |
|
+ } |
|
+#endif |
|
} |
|
} else { |
|
/* 0 is our socket descriptor */ |
|
|
|
--- Makefile.dist 2003-07-28 09:32:28.000000000 +0200 |
|
+++ Makefile 2003-07-28 09:34:55.000000000 +0200 |
|
@@ -54,9 +54,9 @@ |
|
# Adding "configure" to the dependencies serializes this with running |
|
# autoconf, because there are apparently race conditions between |
|
# autoconf and autoheader. |
|
-aconfig.h.in: configure.in configure aclocal.m4 |
|
- rm -f aconfig.h.in aconfig.h |
|
- autoheader |
|
+#aconfig.h.in: configure.in configure aclocal.m4 |
|
+# rm -f aconfig.h.in aconfig.h |
|
+# autoheader |
|
|
|
configure: configure.in aclocal.m4 |
|
rm -f MCONFIG configure config.log acconfig.h config.cache |
|
|
|
|