Index: uspace/lib/c/generic/loader.c
===================================================================
--- uspace/lib/c/generic/loader.c	(revision 1dff985eeea7ec928487e2814a82eb105072a35a)
+++ uspace/lib/c/generic/loader.c	(revision 06e705670524affe4785010ba99cebb7b3d0bae1)
@@ -271,6 +271,5 @@
 	
 	for (i = 0; files[i]; i++) {
-		rc = async_state_change_start(exch, VFS_PASS_HANDLE, *files[i],
-		    0, vfs_exch); 
+		rc = vfs_pass_handle(vfs_exch, *files[i], exch);
 		if (rc != EOK)
 			break;
Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision 1dff985eeea7ec928487e2814a82eb105072a35a)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision 06e705670524affe4785010ba99cebb7b3d0bae1)
@@ -419,18 +419,12 @@
 	req = async_send_1(exch, VFS_IN_READ, fildes, &answer);
 	rc = async_data_read_start(exch, (void *) buf, nbyte);
-	if (rc != EOK) {
-		vfs_exchange_end(exch);
-		
-		sysarg_t rc_orig;
-		async_wait_for(req, &rc_orig);
-		
-		if (rc_orig == EOK)
-			return rc;
-		else
-			return rc_orig;
-	}
-	
-	vfs_exchange_end(exch);
-	async_wait_for(req, &rc);
+
+	vfs_exchange_end(exch);
+	
+	if (rc == EOK) {
+		async_wait_for(req, &rc);
+	} else {
+		async_forget(req);
+	}
 	
 	if (rc != EOK)
@@ -467,19 +461,13 @@
 	req = async_send_1(exch, VFS_IN_WRITE, fildes, &answer);
 	rc = async_data_write_start(exch, (void *) buf, nbyte);
-	if (rc != EOK) {
-		vfs_exchange_end(exch);
-		
-		sysarg_t rc_orig;
-		async_wait_for(req, &rc_orig);
-		
-		if (rc_orig == EOK)
-			return rc;
-		else
-			return rc_orig;
-	}
-	
-	vfs_exchange_end(exch);
-	async_wait_for(req, &rc);
-	
+	
+	vfs_exchange_end(exch);
+	
+	if (rc == EOK) {
+		async_wait_for(req, &rc);
+	} else {
+		async_forget(req);
+	}
+
 	if (rc != EOK)
 		return rc;
@@ -1055,19 +1043,4 @@
 }
 
-int vfs_fd_wait(void)
-{
-	async_exch_t *exch = vfs_exchange_begin();
-	
-	sysarg_t ret;
-	sysarg_t rc = async_req_0_1(exch, VFS_IN_WAIT_HANDLE, &ret);
-	
-	vfs_exchange_end(exch);
-	
-	if (rc == EOK)
-		return (int) ret;
-	
-	return (int) rc;
-}
-
 int vfs_get_mtab_list(list_t *mtab_list)
 {
@@ -1172,4 +1145,40 @@
 }
 
+int vfs_pass_handle(async_exch_t *vfs_exch, int file, async_exch_t *exch)
+{
+	return async_state_change_start(exch, VFS_PASS_HANDLE, (sysarg_t)file, 0, vfs_exch);
+}
+
+int vfs_receive_handle()
+{
+	ipc_callid_t callid;
+	if (!async_state_change_receive(&callid, NULL, NULL, NULL)) {
+		async_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+
+	async_exch_t *vfs_exch = vfs_exchange_begin();
+
+	async_state_change_finalize(callid, vfs_exch);
+
+	sysarg_t ret;
+	sysarg_t rc = async_req_0_1(vfs_exch, VFS_IN_WAIT_HANDLE, &ret);
+
+	async_exchange_end(vfs_exch);
+
+	if (rc != EOK) {
+		return rc;
+	}
+	return ret;
+}
+
+int vfs_clone(int file, bool high_descriptor)
+{
+	async_exch_t *vfs_exch = vfs_exchange_begin();
+	int rc = async_req_2_0(vfs_exch, VFS_IN_CLONE, (sysarg_t) file, (sysarg_t) high_descriptor);
+	vfs_exchange_end(vfs_exch);
+	return rc;
+}
+
 /** @}
  */
Index: uspace/lib/c/include/ipc/vfs.h
===================================================================
--- uspace/lib/c/include/ipc/vfs.h	(revision 1dff985eeea7ec928487e2814a82eb105072a35a)
+++ uspace/lib/c/include/ipc/vfs.h	(revision 06e705670524affe4785010ba99cebb7b3d0bae1)
@@ -83,4 +83,5 @@
 	VFS_IN_OPEN2,
 	VFS_IN_UNLINK2,
+	VFS_IN_CLONE,
 } vfs_in_request_t;
 
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision 1dff985eeea7ec928487e2814a82eb105072a35a)
+++ uspace/lib/c/include/vfs/vfs.h	(revision 06e705670524affe4785010ba99cebb7b3d0bae1)
@@ -58,5 +58,4 @@
 extern int vfs_fhandle(FILE *, int *);
 
-extern int vfs_fd_wait(void);
 extern int vfs_get_mtab_list(list_t *mtab_list);
 
@@ -67,4 +66,10 @@
 extern int _vfs_open(int file, int mode);
 
+extern int vfs_pass_handle(async_exch_t *vfs_exch, int file, async_exch_t *exch);
+extern int vfs_receive_handle(void);
+
+extern int vfs_clone(int file, bool high_descriptor);
+
+
 #endif
 
