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