| 88 | ****************************************************************************/ |
| 89 | |
| 90 | static int nxposix_spawn_exec(FAR pid_t *pidp, FAR const char *path, |
| 91 | FAR const posix_spawn_file_actions_t *actions, |
| 92 | FAR const posix_spawnattr_t *attr, |
| 93 | FAR char * const argv[], |
| 94 | FAR char * const envp[]) |
| 95 | { |
| 96 | FAR const struct symtab_s *symtab; |
| 97 | int nsymbols; |
| 98 | int pid; |
| 99 | int ret = OK; |
| 100 | |
| 101 | DEBUGASSERT(path); |
| 102 | |
| 103 | /* Get the current symbol table selection */ |
| 104 | |
| 105 | exec_getsymtab(&symtab, &nsymbols); |
| 106 | |
| 107 | /* Start the task */ |
| 108 | |
| 109 | pid = exec_spawn(path, argv, envp, symtab, nsymbols, actions, attr); |
| 110 | if (pid < 0) |
| 111 | { |
| 112 | ret = -pid; |
| 113 | serr("ERROR: exec failed: %d\n", ret); |
| 114 | return ret; |
| 115 | } |
| 116 | |
| 117 | /* Return the task ID to the caller */ |
| 118 | |
| 119 | if (pid) |
| 120 | { |
| 121 | *pidp = pid; |
| 122 | } |
| 123 | |
| 124 | return ret; |
| 125 | } |
| 126 | |
| 127 | /**************************************************************************** |
| 128 | * Public Functions |
no test coverage detected