Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision 71717609ad839bc0a9376e3b86af0681295db668)
+++ uspace/lib/c/generic/io/io.c	(revision cdc8ee2d2937b95ef00255cb45eca4e6fc0e8df6)
@@ -104,5 +104,5 @@
 {
 	if (filc > 0) {
-		stdin = fopen_handle(0);
+		stdin = fdopen(0, "r");
 	} else {
 		stdin = &stdin_null;
@@ -111,5 +111,5 @@
 	
 	if (filc > 1) {
-		stdout = fopen_handle(1);
+		stdout = fdopen(1, "w");
 	} else {
 		stdout = &stdout_klog;
@@ -118,5 +118,5 @@
 	
 	if (filc > 2) {
-		stderr = fopen_handle(2);
+		stderr = fdopen(2, "w");
 	} else {
 		stderr = &stderr_klog;
@@ -285,26 +285,4 @@
 }
 
-FILE *fopen_handle(int fd)
-{
-	/* Open file. */
-	FILE *stream = malloc(sizeof(FILE));
-	if (stream == NULL) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	
-	stream->fd = fd;
-	stream->error = false;
-	stream->eof = false;
-	stream->klog = false;
-	stream->sess = NULL;
-	stream->need_sync = false;
-	_setvbuf(stream);
-	
-	list_append(&stream->link, &files);
-	
-	return stream;
-}
-
 int fclose(FILE *stream)
 {
