Rev 4486 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4486 | Rev 4617 | ||
|---|---|---|---|
| Line 111... | Line 111... | ||
| 111 | 111 | ||
| 112 | unsigned int try_exec(char *cmd, char **argv) |
112 | unsigned int try_exec(char *cmd, char **argv) |
| 113 | { |
113 | { |
| 114 | task_id_t tid; |
114 | task_id_t tid; |
| 115 | char *tmp; |
115 | char *tmp; |
| - | 116 | int retval; |
|
| 116 | 117 | ||
| 117 | tmp = str_dup(find_command(cmd)); |
118 | tmp = str_dup(find_command(cmd)); |
| 118 | free(found); |
119 | free(found); |
| 119 | 120 | ||
| 120 | tid = task_spawn((const char *)tmp, argv); |
121 | tid = task_spawn((const char *)tmp, argv); |
| Line 123... | Line 124... | ||
| 123 | if (tid == 0) { |
124 | if (tid == 0) { |
| 124 | cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd); |
125 | cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd); |
| 125 | return 1; |
126 | return 1; |
| 126 | } |
127 | } |
| 127 | 128 | ||
| 128 | task_wait(tid); |
129 | task_wait(tid, &retval); |
| - | 130 | if (retval != 0) |
|
| - | 131 | printf("Command failed (return value %d).\n", retval); |
|
| - | 132 | ||
| 129 | return 0; |
133 | return 0; |
| 130 | } |
134 | } |