Changes in uspace/app/redir/redir.c [d9fae235:eb667613] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/redir/redir.c
rd9fae235 reb667613 43 43 #include <task.h> 44 44 #include <str_error.h> 45 #include <errno.h> 45 46 46 47 #define NAME "redir" … … 76 77 static task_id_t spawn(int argc, char *argv[]) 77 78 { 78 const char **args = (const char **) calloc(argc + 1, sizeof(char *)); 79 const char **args; 80 task_id_t id = 0; 81 int rc; 82 83 args = (const char **) calloc(argc + 1, sizeof(char *)); 79 84 if (!args) { 80 85 printf("No memory available\n"); … … 88 93 args[argc] = NULL; 89 94 90 int err; 91 task_id_t id = task_spawn(argv[0], args, &err); 95 rc = task_spawnv(&id, argv[0], args); 92 96 93 97 free(args); 94 98 95 if ( id == 0)99 if (rc != EOK) { 96 100 printf("%s: Error spawning %s (%s)\n", NAME, argv[0], 97 str_error(err)); 101 str_error(rc)); 102 } 98 103 99 104 return id;
Note:
See TracChangeset
for help on using the changeset viewer.