Index: uspace/lib/c/generic/task_event.c
===================================================================
--- uspace/lib/c/generic/task_event.c	(revision 16d748ee929fdcbdaa98b949e62bf93baf2ddd32)
+++ uspace/lib/c/generic/task_event.c	(revision 856b75b75ee31b41fd4780b482b1d8e9e25a3564)
@@ -41,7 +41,5 @@
 #include "private/taskman.h"
 
-static task_event_handler_t task_event_handler = NULL;
-
-static void taskman_task_event(ipc_call_t *icall)
+static void taskman_task_event(ipc_call_t *icall, task_event_handler_t handler)
 {
 	task_id_t tid = (task_id_t)
@@ -51,5 +49,5 @@
 	int retval = ipc_get_arg5(icall);
 
-	task_event_handler(tid, flags, texit, retval);
+	handler(tid, flags, texit, retval);
 
 	async_answer_0(icall, EOK);
@@ -58,7 +56,4 @@
 static void taskman_event_conn(ipc_call_t *icall, void *arg)
 {
-	/* Accept connection */
-	async_answer_0(icall, EOK);
-
 	while (true) {
 		ipc_call_t call;
@@ -66,10 +61,11 @@
 		if (!async_get_call(&call) || !ipc_get_imethod(&call)) {
 			/* Hangup, end of game */
-			break;
+			async_answer_0(&call, EOK);
+			return;
 		}
 
 		switch (ipc_get_imethod(&call)) {
 		case TASKMAN_EV_TASK:
-			taskman_task_event(&call);
+			taskman_task_event(&call, (task_event_handler_t)arg);
 			break;
 		default:
@@ -85,12 +81,5 @@
 errno_t task_register_event_handler(task_event_handler_t handler, bool past_events)
 {
-	/*
-	 * so far support assign once, modification cannot be naïve due to
-	 * races
-	 */
-	assert(task_event_handler == NULL);
 	assert(handler != NULL); /* no support for "unregistration" */
-
-	task_event_handler = handler;
 
 	async_exch_t *exch = taskman_exchange_begin();
@@ -99,5 +88,5 @@
 	port_id_t port;
 	errno_t rc = async_create_callback_port(exch, INTERFACE_TASKMAN_CB, 0, 0,
-	    taskman_event_conn, NULL, &port);
+	    taskman_event_conn, handler, &port);
 	taskman_exchange_end(exch);
 
