Changeset b40bfac in mainline for uspace/app/bdsh/exec.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/bdsh/exec.c
rd70a463 rb40bfac 41 41 #include <fcntl.h> 42 42 #include <str_error.h> 43 #include <errno.h> 43 44 44 45 #include "config.h" … … 116 117 task_exit_t texit; 117 118 char *tmp; 118 int r etval;119 int rc, retval; 119 120 120 121 tmp = str_dup(find_command(cmd)); 121 122 free(found); 122 123 123 tid = task_spawn(tmp, (const char **) argv, &retval);124 rc = task_spawnv(&tid, tmp, (const char **) argv); 124 125 free(tmp); 125 126 126 if ( tid == 0) {127 if (rc != 0) { 127 128 cli_error(CL_EEXEC, "%s: Cannot spawn `%s' (%s)", progname, cmd, 128 str_error(r etval));129 str_error(rc)); 129 130 return 1; 130 131 } 131 132 132 task_wait(tid, &texit, &retval); 133 if (texit != TASK_EXIT_NORMAL) { 133 rc = task_wait(tid, &texit, &retval); 134 if (rc != EOK) { 135 printf("%s: Failed waiting for command (%s)\n", str_error(rc)); 136 } else if (texit != TASK_EXIT_NORMAL) { 134 137 printf("%s: Command failed (unexpectedly terminated)\n", progname); 135 138 } else if (retval != 0) { 136 printf("%s: Command failed ( %s)\n",137 progname, str_error(retval));139 printf("%s: Command failed (exit code %d)\n", 140 progname, retval); 138 141 } 139 142
Note:
See TracChangeset
for help on using the changeset viewer.