aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-11-10 11:02:03 +0000
committerChristopher Baines <mail@cbaines.net>2023-11-10 11:02:03 +0000
commitc4d6c32de39eedffb3c4c0982a85545472eef057 (patch)
tree7311be5c9635c209f6b02b519ed465597ffac165
parent20f85c2fdba3199aa14b6e314291577cf5b44611 (diff)
downloadbffe-c4d6c32de39eedffb3c4c0982a85545472eef057.tar
bffe-c4d6c32de39eedffb3c4c0982a85545472eef057.tar.gz
Create the pid file even earlier
-rw-r--r--bffe/server.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/bffe/server.scm b/bffe/server.scm
index 1940488..76f8212 100644
--- a/bffe/server.scm
+++ b/bffe/server.scm
@@ -602,6 +602,11 @@
pid-file
metrics-registry)
+ (when pid-file
+ (call-with-output-file pid-file
+ (lambda (port)
+ (simple-format port "~A\n" (getpid)))))
+
(let* ((state-channel
(make-state-channel
event-source))
@@ -629,11 +634,6 @@
event-source
controller-args)))
- (when pid-file
- (call-with-output-file pid-file
- (lambda (port)
- (simple-format port "~A\n" (getpid)))))
-
;; Wait until the events channel catches up
(while (< (get-state-id) initial-state-id)
(sleep 1))