Index: libc/generic/async.c
===================================================================
--- libc/generic/async.c	(revision c1d2c9dd2e8ed998a195ce76e6c2cb87a660d0d7)
+++ libc/generic/async.c	(revision 46bd593f8b19eab1ef78d0cf427b42afd47bd1a3)
@@ -129,5 +129,9 @@
 } connection_t;
 
+
 __thread connection_t *PS_connection;
+
+static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
+static async_client_conn_t client_connection = default_client_connection;
 
 /** Add microseconds to give timeval */
@@ -273,5 +277,5 @@
  * user code.
  */
-void client_connection(ipc_callid_t callid, ipc_call_t *call)
+static void default_client_connection(ipc_callid_t callid, ipc_call_t *call)
 {
 	ipc_answer_fast(callid, ENOENT, 0, 0);
@@ -671,2 +675,11 @@
 	free(msg);
 }
+
+/** Set function that is called, IPC_M_CONNECT_ME_TO is received
+ *
+ * @param conn Function that will form new psthread.
+ */
+void async_set_client_connection(async_client_conn_t conn)
+{
+	client_connection = conn;
+}
Index: libc/generic/io/stream.c
===================================================================
--- libc/generic/io/stream.c	(revision c1d2c9dd2e8ed998a195ce76e6c2cb87a660d0d7)
+++ libc/generic/io/stream.c	(revision 46bd593f8b19eab1ef78d0cf427b42afd47bd1a3)
@@ -53,15 +53,7 @@
 stream_t streams[FDS] = {{0, 0, 0}};
 
-/*
-ssize_t write_stdout(void *param, const void * buf, size_t count);
-ssize_t write_stdout(void *param, const void * buf, size_t count)
-{
-	return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
-}*/
-
 static ssize_t write_stderr(void *param, const void *buf, size_t count)
 {
 	return count;
-	//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
 }
 
@@ -78,5 +70,4 @@
 	}
 	return i;
-	//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
 }
 
@@ -90,5 +81,4 @@
 	
 	return count;
-	//return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);
 }
 
