Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -122,9 +122,10 @@
 	cons_event_t ev;
 	kbd_event_t *kev;
+	errno_t rc;
 
 	while (true) {
-		if (!console_get_event(console, &ev)) {
+		rc = console_get_event(console, &ev);
+		if (rc != EOK)
 			return;
-		}
 		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
 			kev = &ev.ev.key;
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -146,4 +146,5 @@
 {
 	va_list args;
+	errno_t rc;
 
 	va_start(args, message);
@@ -154,5 +155,7 @@
 		cons_event_t ev;
 		console_flush(con);
-		console_get_event(con, &ev);
+		rc = console_get_event(con, &ev);
+		if (rc != EOK)
+			exit(1);
 		if (ev.type != CEV_KEY || ev.ev.key.type != KEY_PRESS ||
 		    (ev.ev.key.mods & (KM_CTRL | KM_ALT)) != 0) {
Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/edit/edit.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -251,5 +251,8 @@
 
 	while (!done) {
-		console_get_event(con, &ev);
+		rc = console_get_event(con, &ev);
+		if (rc != EOK)
+			break;
+
 		pane.rflags = 0;
 
@@ -634,4 +637,5 @@
 	int nc;
 	bool done;
+	errno_t rc;
 
 	asprintf(&str, "%s: %s", prompt, init_value);
@@ -648,5 +652,7 @@
 
 	while (!done) {
-		console_get_event(con, &ev);
+		rc = console_get_event(con, &ev);
+		if (rc != EOK)
+			return NULL;
 
 		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
Index: uspace/app/mkbd/main.c
===================================================================
--- uspace/app/mkbd/main.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/mkbd/main.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -174,6 +174,6 @@
 	while (true) {
 		cons_event_t ev;
-		bool ok = console_get_event(con, &ev);
-		if (!ok) {
+		errno_t rc = console_get_event(con, &ev);
+		if (rc != EOK) {
 			printf("Connection with console broken: %s.\n",
 			    str_error(errno));
Index: uspace/app/modplay/modplay.c
===================================================================
--- uspace/app/modplay/modplay.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/modplay/modplay.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -174,6 +174,10 @@
 	while (true) {
 		timeout = 0;
-		if (console_get_event_timeout(con, &event, &timeout))
+		rc = console_get_event_timeout(con, &event, &timeout);
+		if (rc == EOK)
 			modplay_event(&event);
+		else if (rc != ETIMEOUT)
+			break;
+
 		if (quit)
 			break;
Index: uspace/app/netecho/netecho.c
===================================================================
--- uspace/app/netecho/netecho.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/netecho/netecho.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -121,4 +121,5 @@
 {
 	cons_event_t ev;
+	errno_t rc;
 
 	printf("Communication started. Press Ctrl-Q to quit.\n");
@@ -128,5 +129,8 @@
 	done = false;
 	while (!done) {
-		console_get_event(con, &ev);
+		rc = console_get_event(con, &ev);
+		if (rc != EOK)
+			break;
+
 		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS)
 			key_handle(&ev.ev.key);
Index: uspace/app/nterm/nterm.c
===================================================================
--- uspace/app/nterm/nterm.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/nterm/nterm.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -130,5 +130,8 @@
 	done = false;
 	while (!done) {
-		console_get_event(con, &ev);
+		rc = console_get_event(con, &ev);
+		if (rc != EOK)
+			break;
+
 		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS)
 			key_handle(&ev.ev.key);
Index: uspace/app/ping/ping.c
===================================================================
--- uspace/app/ping/ping.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/ping/ping.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -196,6 +196,10 @@
 	while (true) {
 		cons_event_t ev;
-		if (!console_get_event(con, &ev))
-			break;
+		errno_t rc;
+		rc = console_get_event(con, &ev);
+		if (rc != EOK) {
+			ping_signal_received(RECEIVED_INTERRUPT);
+			break;
+		}
 
 		if ((ev.type == CEV_KEY) && (ev.ev.key.type == KEY_PRESS) &&
Index: uspace/app/tester/ipc/starve.c
===================================================================
--- uspace/app/tester/ipc/starve.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/tester/ipc/starve.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -57,7 +57,12 @@
 		cons_event_t ev;
 		usec_t timeout = 0;
-		bool has_event = console_get_event_timeout(console, &ev, &timeout);
-		if (has_event && ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
-			TPRINTF("Key %d pressed, terminating.\n", ev.ev.key.key);
+		errno_t rc = console_get_event_timeout(console, &ev, &timeout);
+		if (rc == EOK) {
+			if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
+				TPRINTF("Key %d pressed, terminating.\n", ev.ev.key.key);
+				break;
+			}
+		} else if (rc != ETIMEOUT) {
+			TPRINTF("Got rc=%d, terminating.\n", rc);
 			break;
 		}
Index: uspace/app/tetris/scores.c
===================================================================
--- uspace/app/tetris/scores.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/tetris/scores.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -126,4 +126,5 @@
 	cons_event_t ev;
 	kbd_event_t *kev;
+	errno_t rc;
 
 	clear_screen();
@@ -141,5 +142,6 @@
 	while (true) {
 		console_flush(console);
-		if (!console_get_event(console, &ev))
+		rc = console_get_event(console, &ev);
+		if (rc != EOK)
 			exit(1);
 
Index: uspace/app/tetris/screen.c
===================================================================
--- uspace/app/tetris/screen.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/tetris/screen.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -54,4 +54,5 @@
  */
 
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -340,10 +341,14 @@
 {
 	usec_t timeout = fallrate;
+	errno_t rc;
 
 	while (timeout > 0) {
 		cons_event_t event;
 
-		if (!console_get_event_timeout(console, &event, &timeout))
+		rc = console_get_event_timeout(console, &event, &timeout);
+		if (rc == ETIMEOUT)
 			break;
+		if (rc != EOK)
+			exit(1);
 	}
 }
@@ -354,4 +359,6 @@
 int tgetchar(void)
 {
+	errno_t rc;
+
 	/*
 	 * Reset timeleft to fallrate whenever it is not positive
@@ -376,8 +383,11 @@
 		cons_event_t event;
 
-		if (!console_get_event_timeout(console, &event, &timeleft)) {
+		rc = console_get_event_timeout(console, &event, &timeleft);
+		if (rc == ETIMEOUT) {
 			timeleft = 0;
 			return -1;
 		}
+		if (rc != EOK)
+			exit(1);
 
 		if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
@@ -394,10 +404,14 @@
 {
 	char32_t c = 0;
+	errno_t rc;
 
 	while (c == 0) {
 		cons_event_t event;
 
-		if (!console_get_event(console, &event))
+		rc = console_get_event(console, &event);
+		if (rc == ETIMEOUT)
 			return -1;
+		if (rc != EOK)
+			exit(1);
 
 		if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
Index: uspace/app/tetris/tetris.c
===================================================================
--- uspace/app/tetris/tetris.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/tetris/tetris.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -202,4 +202,6 @@
 	while (true) {
 		int i = getchar();
+		if (i < 0)
+			return 0;
 
 		switch (i) {
Index: uspace/app/top/screen.c
===================================================================
--- uspace/app/top/screen.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/top/screen.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -534,7 +534,12 @@
 /** Get char with timeout
  *
+ * @param sec Timeout in seconds
+ * @param rch Place to store character on success
+ * @return EOK on success, ETIMEOUT on time out, EIO on other error
  */
-int tgetchar(sec_t sec)
-{
+errno_t tgetchar(sec_t sec, int *rch)
+{
+	errno_t rc;
+
 	/*
 	 * Reset timeleft whenever it is not positive.
@@ -548,5 +553,5 @@
 	 * update timeleft so that the next call to tgetchar()
 	 * will not wait as long. If there is no input,
-	 * make timeleft zero and return -1.
+	 * make timeleft zero and return ETIMEOUT.
 	 */
 
@@ -557,8 +562,13 @@
 
 		warning_timeleft -= timeleft;
-		if (!console_get_event_timeout(console, &event, &timeleft)) {
+		rc = console_get_event_timeout(console, &event, &timeleft);
+		if (rc == ETIMEOUT) {
 			timeleft = 0;
-			return -1;
-		}
+			return ETIMEOUT;
+		}
+
+		if (rc != EOK)
+			return EIO;
+
 		warning_timeleft += timeleft;
 
@@ -567,5 +577,6 @@
 	}
 
-	return (int) c;
+	*rch = (int) c;
+	return EOK;
 }
 
Index: uspace/app/top/screen.h
===================================================================
--- uspace/app/top/screen.h	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/top/screen.h	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -35,4 +35,5 @@
 #define TOP_SCREEN_H_
 
+#include <errno.h>
 #include <io/console.h>
 #include <io/verify.h>
@@ -47,5 +48,5 @@
     _HELENOS_PRINTF_ATTRIBUTE(1, 2);
 
-extern int tgetchar(sec_t);
+extern errno_t tgetchar(sec_t, int *);
 
 #endif
Index: uspace/app/top/top.c
===================================================================
--- uspace/app/top/top.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/top/top.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -583,4 +583,6 @@
 	data_t data_prev;
 	const char *ret = NULL;
+	errno_t rc;
+	int c;
 
 	screen_init();
@@ -595,7 +597,7 @@
 	/* And paint screen until death */
 	while (true) {
-		int c = tgetchar(UPDATE_INTERVAL);
-
-		if (c < 0) { /* timeout */
+		rc = tgetchar(UPDATE_INTERVAL, &c);
+
+		if (rc == ETIMEOUT) { /* timeout */
 			data_prev = data;
 			if ((ret = read_data(&data)) != NULL) {
@@ -608,4 +610,7 @@
 
 			c = -1;
+		} else if (rc != EOK) {
+			/* Error (e.g. communication with console lost) */
+			goto out;
 		}
 
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/app/trace/trace.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -511,4 +511,5 @@
 {
 	cons_event_t event;
+	errno_t rc;
 
 	(void) arg;
@@ -522,5 +523,6 @@
 		fibril_mutex_unlock(&state_lock);
 
-		if (!console_get_event(console, &event))
+		rc = console_get_event(console, &event);
+		if (rc != EOK)
 			return EINVAL;
 
Index: uspace/lib/c/generic/io/console.c
===================================================================
--- uspace/lib/c/generic/io/console.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/lib/c/generic/io/console.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -180,5 +180,11 @@
 }
 
-bool console_get_event(console_ctrl_t *ctrl, cons_event_t *event)
+/** Get console event.
+ *
+ * @param ctrl Console
+ * @param event Place to store event
+ * @return EOK on success, EIO on failure
+ */
+errno_t console_get_event(console_ctrl_t *ctrl, cons_event_t *event)
 {
 	if (ctrl->input_aid == 0) {
@@ -192,14 +198,10 @@
 		async_wait_for(aid, &rc);
 
-		if (rc != EOK) {
-			errno = rc;
-			return false;
-		}
+		if (rc != EOK)
+			return EIO;
 
 		rc = console_ev_decode(&result, event);
-		if (rc != EOK) {
-			errno = rc;
-			return false;
-		}
+		if (rc != EOK)
+			return EIO;
 	} else {
 		errno_t retval;
@@ -208,20 +210,26 @@
 		ctrl->input_aid = 0;
 
-		if (retval != EOK) {
-			errno = retval;
-			return false;
-		}
+		if (retval != EOK)
+			return EIO;
 
 		errno_t rc = console_ev_decode(&ctrl->input_call, event);
-		if (rc != EOK) {
-			errno = rc;
-			return false;
-		}
-	}
-
-	return true;
-}
-
-bool console_get_event_timeout(console_ctrl_t *ctrl, cons_event_t *event,
+		if (rc != EOK)
+			return EIO;
+	}
+
+	return EOK;
+}
+
+/** Get console event with timeout.
+ *
+ * @param ctrl Console
+ * @param event Place to store event
+ * @param timeout Pointer to timeout. This will be updated to reflect
+ *                the remaining time in case of timeout.
+ * @return EOK on success (event received), ETIMEOUT on time out,
+ *         EIO on I/O error (e.g. lost console connection), ENOMEM
+ *         if out of memory
+ */
+errno_t console_get_event_timeout(console_ctrl_t *ctrl, cons_event_t *event,
     usec_t *timeout)
 {
@@ -239,21 +247,18 @@
 	errno_t rc = async_wait_timeout(ctrl->input_aid, &retval, *timeout);
 	if (rc != EOK) {
+		if (rc == ENOMEM)
+			return ENOMEM;
 		*timeout = 0;
-		errno = rc;
-		return false;
+		return ETIMEOUT;
 	}
 
 	ctrl->input_aid = 0;
 
-	if (retval != EOK) {
-		errno = retval;
-		return false;
-	}
+	if (retval != EOK)
+		return EIO;
 
 	rc = console_ev_decode(&ctrl->input_call, event);
-	if (rc != EOK) {
-		errno = rc;
-		return false;
-	}
+	if (rc != EOK)
+		return EIO;
 
 	/* Update timeout */
@@ -262,5 +267,5 @@
 	*timeout -= NSEC2USEC(ts_sub_diff(&t1, &t0));
 
-	return true;
+	return EOK;
 }
 
Index: uspace/lib/c/include/io/console.h
===================================================================
--- uspace/lib/c/include/io/console.h	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/lib/c/include/io/console.h	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -84,6 +84,6 @@
 extern void console_cursor_visibility(console_ctrl_t *, bool);
 extern errno_t console_get_color_cap(console_ctrl_t *, sysarg_t *);
-extern bool console_get_event(console_ctrl_t *, cons_event_t *);
-extern bool console_get_event_timeout(console_ctrl_t *, cons_event_t *,
+extern errno_t console_get_event(console_ctrl_t *, cons_event_t *);
+extern errno_t console_get_event_timeout(console_ctrl_t *, cons_event_t *,
     usec_t *);
 extern errno_t console_map(console_ctrl_t *, sysarg_t, sysarg_t,
Index: uspace/lib/clui/tinput.c
===================================================================
--- uspace/lib/clui/tinput.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/lib/clui/tinput.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -874,4 +874,6 @@
 errno_t tinput_read_i(tinput_t *ti, const char *istr, char **dstr)
 {
+	errno_t rc;
+
 	console_flush(ti->console);
 	if (console_get_size(ti->console, &ti->con_cols, &ti->con_rows) != EOK)
@@ -891,5 +893,6 @@
 
 		cons_event_t ev;
-		if (!console_get_event(ti->console, &ev))
+		rc = console_get_event(ti->console, &ev);
+		if (rc != EOK)
 			return EIO;
 
Index: uspace/lib/ui/src/ui.c
===================================================================
--- uspace/lib/ui/src/ui.c	(revision 760a392a0f9cc393fad7d66a2ba811cc4e11dc79)
+++ uspace/lib/ui/src/ui.c	(revision 87822cef54e5abb65818d91148b7ff319d6292da)
@@ -39,4 +39,5 @@
 #include <fibril.h>
 #include <io/console.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <str.h>
@@ -220,7 +221,7 @@
 void ui_run(ui_t *ui)
 {
-	bool have_event;
 	cons_event_t event;
 	usec_t timeout;
+	errno_t rc;
 
 	/* Only return command prompt if we are running in a separate window */
@@ -231,8 +232,14 @@
 		if (ui->console != NULL) {
 			timeout = 100000;
-			have_event = console_get_event_timeout(ui->console,
+			rc = console_get_event_timeout(ui->console,
 			    &event, &timeout);
-			if (have_event)
+
+			/* Do we actually have an event? */
+			if (rc == EOK) {
 				ui_cons_event_process(ui, &event);
+			} else if (rc != ETIMEOUT) {
+				/* Error, quit */
+				break;
+			}
 		} else {
 			fibril_usleep(100000);
