Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision 36a75a2ebea94aea971bd83a0590dd676373a253)
+++ uspace/app/bdsh/input.c	(revision 1d465bf4b98a5bc5b790ecab106baa34aa9d68ee)
@@ -50,4 +50,6 @@
 #include "errors.h"
 #include "exec.h"
+
+extern volatile unsigned int cli_quit;
 
 /** Text input field. */
@@ -107,4 +109,5 @@
 {
 	char *str;
+	int rc;
 
 	fflush(stdout);
@@ -114,5 +117,16 @@
 	console_set_style(fphone(stdout), STYLE_NORMAL);
 
-	str = tinput_read(tinput);
+	rc = tinput_read(tinput, &str);
+	if (rc == ENOENT) {
+		/* User requested exit */
+		cli_quit = 1;
+		putchar('\n');
+		return;
+	}
+
+	if (rc != EOK) {
+		/* Error in communication with console */
+		return;
+	}
 
 	/* Check for empty input. */
