Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/comms/bforce-kst/files/patch-daemon.c
16461 views
1
--- bforce/daemon.c.old Tue Jun 1 16:14:31 2004
2
+++ bforce/daemon.c Tue Jun 1 16:20:15 2004
3
@@ -772,10 +772,13 @@
4
fclose(pf);
5
6
if (hispid != 0) {
7
+ if (hispid == mypid)
8
+ return 0;
9
if (kill(hispid, 0) == 0) {
10
log("daemon_pidfile: another daemon exist. pid=%d", hispid);
11
return (-1);
12
- } else if(errno != ESRCH) {
13
+ }
14
+ if (errno != ESRCH) {
15
log("daemon_pidfile: error sending signal. pid=%d, errno=%d", hispid, errno);
16
return (-1);
17
}
18
19