| 113 | ****************************************************************************/ |
| 114 | |
| 115 | int execve(FAR const char *path, FAR char * const argv[], |
| 116 | FAR char *const envp[]) |
| 117 | { |
| 118 | FAR const struct symtab_s *symtab; |
| 119 | int nsymbols; |
| 120 | int ret; |
| 121 | |
| 122 | /* Get the current symbol table selection */ |
| 123 | |
| 124 | exec_getsymtab(&symtab, &nsymbols); |
| 125 | |
| 126 | /* Start the task */ |
| 127 | |
| 128 | ret = exec(path, argv, envp, symtab, nsymbols); |
| 129 | if (ret < 0) |
| 130 | { |
| 131 | serr("ERROR: exec failed: %d\n", get_errno()); |
| 132 | return ERROR; |
| 133 | } |
| 134 | |
| 135 | /* Then exit */ |
| 136 | |
| 137 | _exit(0); |
| 138 | |
| 139 | /* We should not get here, but might be needed by some compilers. Other, |
| 140 | * smarter compilers might complain that this code is unreachable. You |
| 141 | * just can't win. |
| 142 | */ |
| 143 | |
| 144 | return ERROR; |
| 145 | } |
| 146 | |
| 147 | #endif /* CONFIG_LIBC_EXECFUNCS */ |
no test coverage detected