MCPcopy Create free account
hub / github.com/apache/nuttx / execve

Function execve

sched/task/task_execve.c:115–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 ****************************************************************************/
114
115int 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 */

Callers 2

execleFunction · 0.85
execvFunction · 0.85

Calls 3

exec_getsymtabFunction · 0.85
execFunction · 0.85
_exitFunction · 0.70

Tested by

no test coverage detected