Changeset ae45201 in mainline for uspace/app/bdsh/exec.c
- Timestamp:
- 2011-06-11T21:32:54Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ea9a1d
- Parents:
- 28ee877e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/exec.c
r28ee877e rae45201 112 112 } 113 113 114 unsigned int try_exec(char *cmd, char **argv )114 unsigned int try_exec(char *cmd, char **argv, FILE **files) 115 115 { 116 116 task_id_t tid; 117 117 task_exit_t texit; 118 118 char *tmp; 119 int rc, retval; 119 int rc, retval, i; 120 fdi_node_t file_nodes[3]; 121 fdi_node_t *file_nodes_p[4]; 120 122 121 123 tmp = str_dup(find_command(cmd)); 122 124 free(found); 125 126 for (i = 0; i < 3 && files[i] != NULL; i++) { 127 if (fnode(files[i], &file_nodes[i]) == EOK) { 128 file_nodes_p[i] = &file_nodes[i]; 129 } 130 else { 131 file_nodes_p[i] = NULL; 132 } 133 } 134 file_nodes_p[i] = NULL; 123 135 124 rc = task_spawnv (&tid, tmp, (const char **) argv);136 rc = task_spawnvf(&tid, tmp, (const char **) argv, file_nodes_p); 125 137 free(tmp); 126 138
Note:
See TracChangeset
for help on using the changeset viewer.