Be explicit when we exit
authorWouter Verhelst <w@uter.be>
Sat, 27 Feb 2010 21:39:35 +0000 (22:39 +0100)
committerWouter Verhelst <w@uter.be>
Sat, 27 Feb 2010 21:39:35 +0000 (22:39 +0100)
Currently, when a fatal error occurs, nbd-server logs that error, but
then silently exits -- i.e., it is left to the user to guess that it has
exited. We should be more explicit about that fact.

cliserv.h

index cefdad2..77310c3 100644 (file)
--- a/cliserv.h
+++ b/cliserv.h
@@ -111,8 +111,9 @@ void err(const char *s) {
        s1[maxlen-1] = '\0';
 #ifdef ISSERVER
        syslog(LOG_ERR, "%s", s1);
+       syslog(LOG_ERR, "Exiting.");
 #endif
-       fprintf(stderr, "Error: %s\n", s1);
+       fprintf(stderr, "Error: %s\nExiting.\n", s1);
        exit(1);
 }