aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds.c b/src/mds.c
index c86b08a..ffe7023 100644
--- a/src/mds.c
+++ b/src/mds.c
@@ -340,7 +340,8 @@ int spawn_and_respawn_server(int fd)
goto pfail;
/* If the server exited normally or SIGTERM, do not respawn. */
- if (WIFEXITED(status) || (WEXITSTATUS(status) && WTERMSIG(status)))
+ if (WIFEXITED(status) ? (WEXITSTATUS(status) == 0) :
+ ((WTERMSIG(status) == SIGTERM) || (WTERMSIG(status) == SIGINT)))
goto done; /* Child exited normally, stop. */
/* Get the current time. (End of child process.) */