opnsense-ports/comms/bforce-kst/files/patch-daemon.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

17 lines
509 B
C

--- bforce/daemon.c.old Tue Jun 1 16:14:31 2004
+++ bforce/daemon.c Tue Jun 1 16:20:15 2004
@@ -772,10 +772,13 @@
fclose(pf);
if (hispid != 0) {
+ if (hispid == mypid)
+ return 0;
if (kill(hispid, 0) == 0) {
log("daemon_pidfile: another daemon exist. pid=%d", hispid);
return (-1);
- } else if(errno != ESRCH) {
+ }
+ if (errno != ESRCH) {
log("daemon_pidfile: error sending signal. pid=%d, errno=%d", hispid, errno);
return (-1);
}