1.0.27.30: minor octets.lisp cleanup
[sbcl.git] / src / runtime / monitor.c
index ce0ef79..9d17508 100644 (file)
@@ -302,9 +302,13 @@ quit_cmd(char **ptr)
 
     printf("Really quit? [y] ");
     fflush(stdout);
-    fgets(buf, sizeof(buf), ldb_in);
-    if (buf[0] == 'y' || buf[0] == 'Y' || buf[0] == '\n')
+    if (fgets(buf, sizeof(buf), ldb_in)) {
+        if (buf[0] == 'y' || buf[0] == 'Y' || buf[0] == '\n')
+            exit(1);
+    } else {
+        printf("\nUnable to read response, assuming y.\n");
         exit(1);
+    }
 }
 
 static void