File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ char *find_executable(char *workingDirectory, char *filename);
3030#endif
3131
3232// defined in fork_exec.c
33+ #if defined(HAVE_FORK )
3334ProcHandle
3435do_spawn_fork (char * const args [],
3536 char * workingDirectory , char * * environment ,
@@ -39,6 +40,7 @@ do_spawn_fork (char *const args[],
3940 gid_t * childGroup , uid_t * childUser ,
4041 int flags ,
4142 char * * failed_doing );
43+ #endif
4244
4345// defined in posix_spawn.c
4446ProcHandle
Original file line number Diff line number Diff line change 77#include "runProcess.h"
88#include "common.h"
99
10- #if defined(HAVE_FORK )
11-
1210#include <unistd.h>
1311#include <errno.h>
1412#include <sys/wait.h>
@@ -70,13 +68,19 @@ do_spawn (char *const args[],
7068 return r ;
7169 }
7270
71+ #if defined(HAVE_FORK )
7372 r = do_spawn_fork (args ,
7473 workingDirectory , environment ,
7574 stdInHdl , stdOutHdl , stdErrHdl ,
7675 childGroup , childUser ,
7776 flags ,
7877 failed_doing );
7978 return r ;
79+ #else
80+ * failed_doing = "fork" ;
81+ return -1 ;
82+ #endif
83+
8084}
8185
8286enum pipe_direction {
@@ -267,5 +271,3 @@ waitForProcess (ProcHandle handle, int *pret)
267271
268272 return -1 ;
269273}
270-
271- #endif // HAVE_FORK
You can’t perform that action at this time.
0 commit comments