projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52a6fdb
)
Write server PID to citadel.lock in addition to locking it.
author
Art Cancro
<ajc@citadel.org>
Mon, 18 Sep 2023 18:21:10 +0000
(09:21 -0900)
committer
Art Cancro
<ajc@citadel.org>
Mon, 18 Sep 2023 18:21:10 +0000
(09:21 -0900)
This will be useful for systems like FreeBSD that need to know a PID to monitor.
citadel/server/server_main.c
patch
|
blob
|
history
diff --git
a/citadel/server/server_main.c
b/citadel/server/server_main.c
index 349213d6f6bf496724b3d5704e26a1abc6f94ee8..8b6f342153997498b59003f941c79fc9a486b729 100644
(file)
--- a/
citadel/server/server_main.c
+++ b/
citadel/server/server_main.c
@@
-46,6
+46,8
@@
void ctdl_lockfile(int op) {
syslog(LOG_ERR, "main: cannot lock %s (is another citserver running?)", lockfilename);
exit(CTDLEXIT_DB);
}
+ fprintf(fp, "%d\n", getpid());
+ fflush(fp);
return;
}