Changeset 925a21e in mainline for uspace/app/bdsh/exec.c
- Timestamp:
- 2011-09-24T14:20:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (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
r867e2555 r925a21e 40 40 #include <str_error.h> 41 41 #include <errno.h> 42 #include <vfs/vfs.h> 42 43 43 44 #include "config.h" … … 99 100 char *tmp; 100 101 int rc, retval, i; 101 fdi_node_t file_nodes[3];102 fdi_node_t *file_nodes_p[4];102 int file_handles[3]; 103 int *file_handles_p[4]; 103 104 FILE *files[3]; 104 105 … … 111 112 112 113 for (i = 0; i < 3 && files[i] != NULL; i++) { 113 if (f node(files[i], &file_nodes[i]) == EOK) {114 file_ nodes_p[i] = &file_nodes[i];114 if (fhandle(files[i], &file_handles[i]) == EOK) { 115 file_handles_p[i] = &file_handles[i]; 115 116 } 116 117 else { 117 file_ nodes_p[i] = NULL;118 file_handles_p[i] = NULL; 118 119 } 119 120 } 120 file_ nodes_p[i] = NULL;121 file_handles_p[i] = NULL; 121 122 122 rc = task_spawnvf(&tid, tmp, (const char **) argv, file_ nodes_p);123 rc = task_spawnvf(&tid, tmp, (const char **) argv, file_handles_p); 123 124 free(tmp); 124 125 … … 133 134 printf("%s: Failed waiting for command (%s)\n", progname, 134 135 str_error(rc)); 136 return 1; 135 137 } else if (texit != TASK_EXIT_NORMAL) { 136 138 printf("%s: Command failed (unexpectedly terminated)\n", progname); 139 return 1; 137 140 } else if (retval != 0) { 138 141 printf("%s: Command failed (exit code %d)\n", 139 142 progname, retval); 143 return 1; 140 144 } 141 145
Note:
See TracChangeset
for help on using the changeset viewer.