test: serv: die immediately (no sleep) if started with -c

We want to stress test Finit as much as possible.  We add a small log
though (which admittedly gives us a little bit of a delay) just to see
what happens when debugging failing tests.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-11-06 13:54:55 +01:00
parent d5f542dcca
commit a2d0859bf1
+3 -1
View File
@@ -207,8 +207,10 @@ int main(int argc, char *argv[])
do_notify = atoi(sock);
}
if (do_crash)
if (do_crash) {
log("Simulating crash, exiting with code %d", EX_SOFTWARE);
exit(EX_SOFTWARE);
}
log("Entering while(1) loop");
while (running) {