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