Changeset b40bfac in mainline for uspace/app/redir/redir.c
- Timestamp:
- 2010-11-08T07:13:25Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63a1e60
- Parents:
- d70a463 (diff), 3da12d74 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/redir/redir.c
rd70a463 rb40bfac 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; 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.