From bec9c41478f9b458d85fcbdd538701dfb666dc49 Mon Sep 17 00:00:00 2001 From: Radim Kolar Date: Fri, 5 Jun 2020 20:04:33 +0200 Subject: [PATCH] Exit with err 8 if pid file not writable after forking. --- ChangeLog | 1 + server/main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3862872..9b0baa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Version NEXT make sure that our descriptor for running in inetd is not 0 to 2, because we closing these later. This should help systemd internal inetd to work correctly using fspd socket activation. + fspd exits with err 8 if can't write pidfile after forking Version 2.8.1b29 - 24 Aug 2019 added scons command line argument without-fspscan=yes for building diff --git a/server/main.c b/server/main.c index 9018b3d..4c2e0fe 100644 --- a/server/main.c +++ b/server/main.c @@ -374,7 +374,7 @@ int main (int argc, char ** argv) if (forkpid == 0) { /* child prozess */ if (pidfile(pidlogname)) { pidfile_cleanup(pidlogname); /* try cleanup */ - exit(1);/* cannot write pid file - exit */ + exit(8);/* cannot write pid file - exit */ } } else if (forkpid > 0) { /* father prozess */ _exit(0);