Changes in uspace/lib/c/generic/task.c [d9fae235:63f8966] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/task.c
rd9fae235 r63f8966 70 70 * loader API. 71 71 * 72 * @param path Pathname of the binary to execute. 73 * @param argv Command-line arguments. 74 * @param err If not NULL, the error value is stored here. 72 * @param path pathname of the binary to execute 73 * @param argv command-line arguments 75 74 * 76 75 * @return ID of the newly created task or zero on error. 77 76 * 78 77 */ 79 task_id_t task_spawn(const char *path, const char *const args[] , int *err)78 task_id_t task_spawn(const char *path, const char *const args[]) 80 79 { 81 80 /* Connect to a program loader. */ 82 81 loader_t *ldr = loader_connect(); 83 if (ldr == NULL) { 84 if (err != NULL) 85 *err = EREFUSED; 86 82 if (ldr == NULL) 87 83 return 0; 88 }89 84 90 85 /* Get task ID. */ … … 148 143 /* Success */ 149 144 free(ldr); 150 151 if (err != NULL)152 *err = EOK;153 154 145 return task_id; 155 146 … … 158 149 loader_abort(ldr); 159 150 free(ldr); 160 161 if (err != NULL)162 *err = rc;163 151 164 152 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.