Index: uspace/app/bdsh/exec.c
===================================================================
--- uspace/app/bdsh/exec.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/bdsh/exec.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -97,4 +97,5 @@
 {
 	task_id_t tid;
+	task_wait_t twait;
 	task_exit_t texit;
 	char *tmp;
@@ -121,5 +122,5 @@
 	file_handles_p[i] = NULL;
 
-	rc = task_spawnvf(&tid, tmp, (const char **) argv, file_handles_p);
+	rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, file_handles_p);
 	free(tmp);
 
@@ -130,5 +131,5 @@
 	}
 	
-	rc = task_wait(tid, &texit, &retval);
+	rc = task_wait(&twait, &texit, &retval);
 	if (rc != EOK) {
 		printf("%s: Failed waiting for command (%s)\n", progname,
Index: uspace/app/getterm/getterm.c
===================================================================
--- uspace/app/getterm/getterm.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/getterm/getterm.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -165,6 +165,7 @@
 	
 	task_id_t id;
+	task_wait_t twait;
 	
-	int rc = task_spawnv(&id, cmd, (const char * const *) args);
+	int rc = task_spawnv(&id, &twait, cmd, (const char * const *) args);
 	if (rc != EOK) {
 		printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd,
@@ -175,5 +176,5 @@
 	task_exit_t texit;
 	int retval;
-	rc = task_wait(id, &texit, &retval);
+	rc = task_wait(&twait, &texit, &retval);
 	if (rc != EOK) {
 		printf("%s: Error waiting for %s (%s)\n", APP_NAME, cmd,
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/init/init.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -172,5 +172,6 @@
 	va_start(ap, path);
 	task_id_t id;
-	int rc = task_spawn(&id, path, cnt, ap);
+	task_wait_t wait;
+	int rc = task_spawn(&id, &wait, path, cnt, ap);
 	va_end(ap);
 	
@@ -189,5 +190,5 @@
 	task_exit_t texit;
 	int retval;
-	rc = task_wait(id, &texit, &retval);
+	rc = task_wait(&wait, &texit, &retval);
 	if (rc != EOK) {
 		printf("%s: Error waiting for %s (%s)\n", NAME, path,
@@ -253,5 +254,6 @@
 	
 	task_id_t id;
-	int rc = task_spawnl(&id, app, app, winreg, NULL);
+	task_wait_t wait;
+	int rc = task_spawnl(&id, &wait, app, app, winreg, NULL);
 	if (rc != EOK) {
 		printf("%s: Error spawning %s %s (%s)\n", NAME, app,
@@ -262,5 +264,5 @@
 	task_exit_t texit;
 	int retval;
-	rc = task_wait(id, &texit, &retval);
+	rc = task_wait(&wait, &texit, &retval);
 	if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) {
 		printf("%s: Error retrieving retval from %s (%s)\n", NAME,
@@ -278,5 +280,5 @@
 		    APP_GETTERM, svc, LOCFS_MOUNT_POINT, app);
 		
-		int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc,
+		int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
 		    LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL);
 		if (rc != EOK)
@@ -287,5 +289,5 @@
 		    APP_GETTERM, svc, LOCFS_MOUNT_POINT, app);
 		
-		int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc,
+		int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
 		    LOCFS_MOUNT_POINT, "--wait", "--", app, NULL);
 		if (rc != EOK)
Index: uspace/app/redir/redir.c
===================================================================
--- uspace/app/redir/redir.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/redir/redir.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -75,5 +75,5 @@
 }
 
-static task_id_t spawn(int argc, char *argv[])
+static task_id_t spawn(task_wait_t *wait, int argc, char *argv[])
 {
 	const char **args;
@@ -93,5 +93,5 @@
 	args[argc] = NULL;
 	
-	rc = task_spawnv(&id, argv[0], args);
+	rc = task_spawnv(&id, wait, argv[0], args);
 	
 	free(args);
@@ -152,11 +152,12 @@
 	 */
 	setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
-	
-	task_id_t id = spawn(argc - i, argv + i);
+
+	task_wait_t wait;	
+	task_id_t id = spawn(&wait, argc - i, argv + i);
 	
 	if (id != 0) {
 		task_exit_t texit;
 		int retval;
-		task_wait(id, &texit, &retval);
+		task_wait(&wait, &texit, &retval);
 		
 		return retval;
Index: uspace/app/sbi/src/os/helenos.c
===================================================================
--- uspace/app/sbi/src/os/helenos.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/sbi/src/os/helenos.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -250,8 +250,9 @@
 {
 	task_id_t tid;
+	task_wait_t twait;
 	task_exit_t texit;
 	int rc, retval;
 
-	rc = task_spawnv(&tid, cmd[0], (char const * const *) cmd);
+	rc = task_spawnv(&tid, &twait, cmd[0], (char const * const *) cmd);
 	if (rc != EOK) {
 		printf("Error: Failed spawning '%s' (%s).\n", cmd[0],
@@ -261,5 +262,5 @@
 
 	/* XXX Handle exit status and return value. */
-	rc = task_wait(tid, &texit, &retval);
+	rc = task_wait(&twait, &texit, &retval);
 	(void) rc;
 
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/trace/trace.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -876,5 +876,5 @@
 		printf("Waiting for task to exit.\n");
 
-		rc = task_wait(task_id, &texit, &retval);
+		rc = task_wait_task_id(task_id, &texit, &retval);
 		if (rc != EOK) {
 			printf("Failed waiting for task.\n");
Index: uspace/app/viewer/viewer.c
===================================================================
--- uspace/app/viewer/viewer.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/viewer/viewer.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -44,4 +44,5 @@
 #include <surface.h>
 #include <codec/tga.h>
+#include <task.h>
 
 #define NAME  "viewer"
Index: uspace/app/vlaunch/vlaunch.c
===================================================================
--- uspace/app/vlaunch/vlaunch.c	(revision da79df4290209db0fdf4a05ba3f9b9f2b5b5166d)
+++ uspace/app/vlaunch/vlaunch.c	(revision 32e3cdfc8986d9f6c67d7e98cd10bf6ffa0720ef)
@@ -94,5 +94,6 @@
 	
 	task_id_t id;
-	int rc = task_spawnl(&id, app, app, winreg, NULL);
+	task_wait_t wait;
+	int rc = task_spawnl(&id, &wait, app, app, winreg, NULL);
 	if (rc != EOK) {
 		printf("%s: Error spawning %s %s (%s)\n", NAME, app,
@@ -103,5 +104,5 @@
 	task_exit_t texit;
 	int retval;
-	rc = task_wait(id, &texit, &retval);
+	rc = task_wait(&wait, &texit, &retval);
 	if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) {
 		printf("%s: Error retrieving retval from %s (%s)\n", NAME,
