Index: uspace/lib/libc/generic/loader.c
===================================================================
--- uspace/lib/libc/generic/loader.c	(revision 45454e9b4eae43c54f3381318875dcf28b2419a0)
+++ uspace/lib/libc/generic/loader.c	(revision 4470e2627030413dc38c0d3b98d9c6a3e1672564)
@@ -206,5 +206,28 @@
 }
 
+/** Instruct loader to load the program.
+ *
+ * If this function succeeds, the program has been successfully loaded
+ * and is ready to be executed.
+ *
+ * @param ldr		Loader connection structure.
+ * @return		Zero on success or negative error code.
+ */
+int loader_load_program(loader_t *ldr)
+{
+	int rc;
+
+	rc = async_req_0_0(ldr->phone_id, LOADER_LOAD);
+	if (rc != EOK)
+		return rc;
+
+	return EOK;
+}
+
 /** Instruct loader to execute the program.
+ *
+ * Note that this function blocks until the loader actually replies
+ * so you cannot expect this function to return if you are debugging
+ * the task and its thread is stopped.
  *
  * After using this function, no further operations must be performed
@@ -214,5 +237,5 @@
  * @return		Zero on success or negative error code.
  */
-int loader_start_program(loader_t *ldr)
+int loader_run(loader_t *ldr)
 {
 	int rc;
@@ -222,5 +245,4 @@
 		return rc;
 
-	ipc_hangup(ldr->phone_id);
 	return EOK;
 }
Index: uspace/lib/libc/generic/task.c
===================================================================
--- uspace/lib/libc/generic/task.c	(revision 45454e9b4eae43c54f3381318875dcf28b2419a0)
+++ uspace/lib/libc/generic/task.c	(revision 4470e2627030413dc38c0d3b98d9c6a3e1672564)
@@ -64,5 +64,5 @@
 	int rc;
 
-	/* Spawn a program loader */	
+	/* Spawn a program loader. */	
 	ldr = loader_spawn();
 	if (ldr == NULL)
@@ -74,20 +74,28 @@
 		goto error;
 
-	/* Send program pathname */
+	/* Send program pathname. */
 	rc = loader_set_pathname(ldr, path);
 	if (rc != EOK)
 		goto error;
 
-	/* Send arguments */
+	/* Send arguments. */
 	rc = loader_set_args(ldr, argv);
 	if (rc != EOK)
 		goto error;
 
-	/* Request loader to start the program */	
-	rc = loader_start_program(ldr);
+	/* Load the program. */
+	rc = loader_load_program(ldr);
+	if (rc != EOK)
+		goto error;
+
+	/* Run it. */
+	/* Load the program. */
+	rc = loader_run(ldr);
 	if (rc != EOK)
 		goto error;
 
 	/* Success */
+
+	free(ldr);
 	return task_id;
 
@@ -95,4 +103,6 @@
 error:
 	loader_abort(ldr);
+	free(ldr);
+
 	return 0;
 }
Index: uspace/lib/libc/include/ipc/loader.h
===================================================================
--- uspace/lib/libc/include/ipc/loader.h	(revision 45454e9b4eae43c54f3381318875dcf28b2419a0)
+++ uspace/lib/libc/include/ipc/loader.h	(revision 4470e2627030413dc38c0d3b98d9c6a3e1672564)
@@ -43,4 +43,5 @@
 	LOADER_SET_PATHNAME,
 	LOADER_SET_ARGS,
+	LOADER_LOAD,
 	LOADER_RUN
 } fb_request_t;
Index: uspace/lib/libc/include/loader/loader.h
===================================================================
--- uspace/lib/libc/include/loader/loader.h	(revision 45454e9b4eae43c54f3381318875dcf28b2419a0)
+++ uspace/lib/libc/include/loader/loader.h	(revision 4470e2627030413dc38c0d3b98d9c6a3e1672564)
@@ -47,5 +47,6 @@
 extern int loader_set_pathname(loader_t *, const char *);
 extern int loader_set_args(loader_t *, char *const []);
-extern int loader_start_program(loader_t *);
+extern int loader_load_program(loader_t *);
+extern int loader_run(loader_t *);
 extern void loader_abort(loader_t *);
 
