Skip to content

Commit 8362430

Browse files
authored
Merge pull request #289 from bgamari/master
Revert "Use POSIX_SPAWN_CLOEXEC_DEFAULT in posix_spawn.c when available"
2 parents 97e924a + cba7a4c commit 8362430

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

cbits/posix/posix_spawn.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,9 @@ do_spawn_posix (char *const args[],
108108
if (childGroup || childUser) {
109109
return -2;
110110
}
111-
112-
short spawn_flags = 0;
113-
114111
if ((flags & RUN_PROCESS_IN_CLOSE_FDS) != 0) {
115-
#if defined(HAVE_POSIX_SPAWN_CLOEXEC_DEFAULT)
116-
spawn_flags |= POSIX_SPAWN_CLOEXEC_DEFAULT;
117-
#else
112+
// TODO: can this be efficiently supported?
118113
return -2;
119-
#endif
120114
}
121115

122116
// Now the main act...
@@ -125,6 +119,7 @@ do_spawn_posix (char *const args[],
125119
posix_spawnattr_t sa;
126120
int r;
127121
ProcHandle ret;
122+
short spawn_flags = 0;
128123

129124
r = posix_spawn_file_actions_init(&fa);
130125
if (r != 0) {

configure.ac

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ AC_CHECK_DECLS([POSIX_SPAWN_SETSID, POSIX_SPAWN_SETSID_NP],[],[],[
3131
#define _GNU_SOURCE
3232
#include <spawn.h>
3333
])
34-
AC_CHECK_DECLS([POSIX_SPAWN_CLOEXEC_DEFAULT],[],[],[
35-
#define _GNU_SOURCE
36-
#include <spawn.h>
37-
])
3834
AC_CHECK_DECLS([POSIX_SPAWN_SETPGROUP],[],[],[
3935
#define _GNU_SOURCE
4036
#include <spawn.h>

0 commit comments

Comments
 (0)