Index: uspace/lib/c/generic/task.c
===================================================================
--- uspace/lib/c/generic/task.c	(revision dbf2ca4c8283c65135753fbf668b279e0b387c12)
+++ uspace/lib/c/generic/task.c	(revision 9f5cf682316ed39433d78a5a4d75f3d62faf22be)
@@ -201,4 +201,40 @@
  *
  * This is really just a convenience wrapper over the more complicated
+ * loader API. Arguments are passed in a va_list.
+ *
+ * @param id   If not NULL, the ID of the task is stored here on success.
+ * @param path Pathname of the binary to execute.
+ * @param cnt  Number of arguments.
+ * @param ap   Command-line arguments.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int task_spawn(task_id_t *task_id, const char *path, int cnt, va_list ap)
+{
+	/* Allocate argument list. */
+	const char **arglist = malloc(cnt * sizeof(const char *));
+	if (arglist == NULL)
+		return ENOMEM;
+	
+	/* Fill in arguments. */
+	const char *arg;
+	cnt = 0;
+	do {
+		arg = va_arg(ap, const char *);
+		arglist[cnt++] = arg;
+	} while (arg != NULL);
+	
+	/* Spawn task. */
+	int rc = task_spawnv(task_id, path, arglist);
+	
+	/* Free argument list. */
+	free(arglist);
+	return rc;
+}
+
+/** Create a new task by running an executable from the filesystem.
+ *
+ * This is really just a convenience wrapper over the more complicated
  * loader API. Arguments are passed as a null-terminated list of arguments.
  *
@@ -216,5 +252,4 @@
 	va_list ap;
 	const char *arg;
-	const char **arglist;
 	int cnt = 0;
 	
@@ -226,23 +261,8 @@
 	va_end(ap);
 	
-	/* Allocate argument list. */
-	arglist = malloc(cnt * sizeof(const char *));
-	if (arglist == NULL)
-		return ENOMEM;
-	
-	/* Fill in arguments. */
-	cnt = 0;
 	va_start(ap, path);
-	do {
-		arg = va_arg(ap, const char *);
-		arglist[cnt++] = arg;
-	} while (arg != NULL);
+	int rc = task_spawn(task_id, path, cnt, ap);
 	va_end(ap);
 	
-	/* Spawn task. */
-	int rc = task_spawnv(task_id, path, arglist);
-	
-	/* Free argument list. */
-	free(arglist);
 	return rc;
 }
Index: uspace/lib/c/include/task.h
===================================================================
--- uspace/lib/c/include/task.h	(revision dbf2ca4c8283c65135753fbf668b279e0b387c12)
+++ uspace/lib/c/include/task.h	(revision 9f5cf682316ed39433d78a5a4d75f3d62faf22be)
@@ -38,4 +38,5 @@
 #include <sys/types.h>
 #include <abi/proc/task.h>
+#include <stdarg.h>
 
 typedef enum {
@@ -48,8 +49,8 @@
 extern int task_kill(task_id_t);
 
-extern task_id_t task_spawn(const char *, const char *const[], int *);
 extern int task_spawnv(task_id_t *, const char *path, const char *const []);
 extern int task_spawnvf(task_id_t *, const char *path, const char *const [],
     int *const []);
+extern int task_spawn(task_id_t *, const char *path, int, va_list ap);
 extern int task_spawnl(task_id_t *, const char *path, ...);
 
