aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/posix/posix_spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/posix/posix_spawn.c')
-rw-r--r--newlib/libc/posix/posix_spawn.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/newlib/libc/posix/posix_spawn.c b/newlib/libc/posix/posix_spawn.c
index 46e4e53..51ad23f 100644
--- a/newlib/libc/posix/posix_spawn.c
+++ b/newlib/libc/posix/posix_spawn.c
@@ -102,56 +102,13 @@ Supporting OS subroutines required: <<_close>>, <<dup2>>, <<_fcntl>>,
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "posix_spawn.h"
/* Only deal with a pointer to environ, to work around subtle bugs with shared
libraries and/or small data systems where the user declares his own
'environ'. */
static char ***p_environ = &environ;
-struct __posix_spawnattr {
- short sa_flags;
- pid_t sa_pgroup;
- struct sched_param sa_schedparam;
- int sa_schedpolicy;
- sigset_t sa_sigdefault;
- sigset_t sa_sigmask;
-};
-
-struct __posix_spawn_file_actions {
- STAILQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
-};
-
-typedef struct __posix_spawn_file_actions_entry {
- STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
- enum {
- FAE_OPEN,
- FAE_DUP2,
- FAE_CLOSE,
- FAE_CHDIR,
- FAE_FCHDIR
- } fae_action;
-
- int fae_fildes;
- union {
- struct {
- char *path;
-#define fae_path fae_data.open.path
- int oflag;
-#define fae_oflag fae_data.open.oflag
- mode_t mode;
-#define fae_mode fae_data.open.mode
- } open;
- struct {
- int newfildes;
-#define fae_newfildes fae_data.dup2.newfildes
- } dup2;
- char *dir;
-#define fae_dir fae_data.dir
- int dirfd;
-#define fae_dirfd fae_data.dirfd
- } fae_data;
-} posix_spawn_file_actions_entry_t;
-
/*
* Spawn routines
*/