1#ifndef __VSF_LINUX_SPAWN_H__
2#define __VSF_LINUX_SPAWN_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
61#if VSF_LINUX_APPLET_USE_SPAWN == ENABLED
90# ifndef __VSF_APPLET__
95#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SPAWN_LIB__))\
96 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SPAWN == ENABLED
98#ifndef VSF_LINUX_APPLET_SPAWN_VPLT
99# if VSF_LINUX_USE_APPLET == ENABLED
100# define VSF_LINUX_APPLET_SPAWN_VPLT \
101 ((vsf_linux_spawn_vplt_t *)(VSF_LINUX_APPLET_VPLT->spawn_vplt))
103# define VSF_LINUX_APPLET_SPAWN_VPLT \
104 ((vsf_linux_spawn_vplt_t *)vsf_vplt((void *)0))
108#define VSF_LINUX_APPLET_SPAWN_ENTRY(__NAME) \
109 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SPAWN_VPLT, __NAME)
110#define VSF_LINUX_APPLET_SPAWN_IMP(...) \
111 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SPAWN_VPLT, __VA_ARGS__)
115 return VSF_LINUX_APPLET_SPAWN_ENTRY(
posix_spawn)(pid, path, actions, attr, argv, env);
119 return VSF_LINUX_APPLET_SPAWN_ENTRY(
posix_spawnp)(pid, file, actions, attr, argv, env);
211 char *
const argv[],
char *
const env[]);
215 char *
const argv[],
char *
const env[]);
236 int fd,
const char *path,
int pid_t
Definition types.h:85
unsigned int mode_t
Definition types.h:87
int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *actions, int fd, const char *path, int oflag, mode_t mode)
Definition vsf_linux.c:4213
int posix_spawnattr_getschedparam(const posix_spawnattr_t *attr, struct sched_param *schedparam)
Definition vsf_linux.c:4176
int posix_spawnattr_setschedparam(posix_spawnattr_t *attr, const struct sched_param *schedparam)
Definition vsf_linux.c:4181
int posix_spawnattr_init(posix_spawnattr_t *attr)
Definition vsf_linux.c:4115
int posix_spawnattr_getsigdefault(const posix_spawnattr_t *attr, sigset_t *sigdefault)
Definition vsf_linux.c:4126
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *actions, int fd, int newfd)
Definition vsf_linux.c:4243
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *actions)
Definition vsf_linux.c:4199
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *actions, int fd)
Definition vsf_linux.c:4231
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *actions)
Definition vsf_linux.c:4205
int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *actions, int fd)
Definition vsf_linux.c:4268
int posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *actions, const posix_spawnattr_t *attr, char *const argv[], char *const env[])
Definition vsf_linux.c:4107
int posix_spawnattr_setflags(posix_spawnattr_t *attr, short int flags)
Definition vsf_linux.c:4151
__VSF_VPLT_DECORATOR__ vsf_linux_spawn_vplt_t vsf_linux_spawn_vplt
Definition vsf_linux.c:4910
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *attr, int *schedpolicy)
Definition vsf_linux.c:4166
int posix_spawnattr_getpgroup(const posix_spawnattr_t *attr, pid_t *pgroup)
Definition vsf_linux.c:4156
int posix_spawnattr_setsigdefault(posix_spawnattr_t *attr, const sigset_t *sigdefault)
Definition vsf_linux.c:4131
int posix_spawnattr_getflags(const posix_spawnattr_t *attr, short int *flags)
Definition vsf_linux.c:4146
int posix_spawnattr_setsigmask(posix_spawnattr_t *attr, const sigset_t *sigmask)
Definition vsf_linux.c:4141
int posix_spawnp(pid_t *pid, const char *file, const posix_spawn_file_actions_t *actions, const posix_spawnattr_t *attr, char *const argv[], char *const env[])
Definition vsf_linux.c:4099
int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgroup)
Definition vsf_linux.c:4161
int posix_spawnattr_getsigmask(const posix_spawnattr_t *attr, sigset_t *sigmask)
Definition vsf_linux.c:4136
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr, int schedpolicy)
Definition vsf_linux.c:4171
int posix_spawnattr_destroy(posix_spawnattr_t *attr)
Definition vsf_linux.c:4121
int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *actions, const char *path)
Definition vsf_linux.c:4256
int allocated
Definition spawn.h:56
int used
Definition spawn.h:57
struct spawn_action * actions
Definition spawn.h:58
short int flags
Definition spawn.h:21
struct spawn_action::@945::@948 open_action
enum spawn_action::@944 tag
union spawn_action::@945 action
struct spawn_action::@945::@947 dup2_action
struct spawn_action::@945::@946 close_action
struct spawn_action::@945::@949 chdir_action
@ spawn_do_open
Definition spawn.h:28
@ spawn_do_fchdir
Definition spawn.h:30
@ spawn_do_chdir
Definition spawn.h:29
@ spawn_do_dup2
Definition spawn.h:27
@ spawn_do_close
Definition spawn.h:26
char * path
Definition spawn.h:42
struct spawn_action::@945::@950 fchdir_action
int oflag
Definition spawn.h:43
int newfd
Definition spawn.h:38
mode_t mode
Definition spawn.h:44
int fd
Definition spawn.h:34
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setflags)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getsigdefault)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getflags)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getsigmask)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_addclose)
vsf_vplt_info_t info
Definition spawn.h:63
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getschedparam)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_adddup2)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_destroy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setschedparam)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getschedpolicy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_addopen)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_init)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_destroy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_getpgroup)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setschedpolicy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setpgroup)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setsigdefault)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_addfchdir_np)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawnattr_setsigmask)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_addchdir_np)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_spawn_file_actions_init)
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165