mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
libc: Implement execvp, execlp and execvpe as macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
55b5561fdb
commit
49eb2bd415
+7
-2
@@ -54,6 +54,13 @@
|
|||||||
#define POSIX_SPAWN_SETSIGMASK (1 << 5) /* 1: Set sigmask */
|
#define POSIX_SPAWN_SETSIGMASK (1 << 5) /* 1: Set sigmask */
|
||||||
#define POSIX_SPAWN_SETSID (1 << 7) /* 1: Create the new session(glibc specific) */
|
#define POSIX_SPAWN_SETSID (1 << 7) /* 1: Create the new session(glibc specific) */
|
||||||
|
|
||||||
|
/* NOTE: NuttX provides only one implementation: If
|
||||||
|
* CONFIG_LIBC_ENVPATH is defined, then only posix_spawnp() behavior
|
||||||
|
* is supported; otherwise, only posix_spawn behavior is supported.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define posix_spawnp posix_spawn
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Type Definitions
|
* Type Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -129,8 +136,6 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
|
|||||||
FAR const posix_spawn_file_actions_t *file_actions,
|
FAR const posix_spawn_file_actions_t *file_actions,
|
||||||
FAR const posix_spawnattr_t *attr,
|
FAR const posix_spawnattr_t *attr,
|
||||||
FAR char * const argv[], FAR char * const envp[]);
|
FAR char * const argv[], FAR char * const envp[]);
|
||||||
#define posix_spawnp(pid,path,file_actions,attr,argv,envp) \
|
|
||||||
posix_spawn(pid,path,file_actions,attr,argv,envp)
|
|
||||||
|
|
||||||
#ifndef CONFIG_BUILD_KERNEL
|
#ifndef CONFIG_BUILD_KERNEL
|
||||||
/* Non-standard task_spawn interface. This function uses the same
|
/* Non-standard task_spawn interface. This function uses the same
|
||||||
|
|||||||
@@ -280,6 +280,17 @@
|
|||||||
# define lockf64 lockf
|
# define lockf64 lockf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* NOTE: NuttX provides only one implementation: If
|
||||||
|
* CONFIG_LIBC_ENVPATH is defined, then only execvp/execlp/execvpe behavior
|
||||||
|
* is supported; otherwise, only execv/execl/execve behavior is supported.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_LIBC_EXECFUNCS
|
||||||
|
# define execvp execv
|
||||||
|
# define execlp execl
|
||||||
|
# define execvpe execve
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user