diff options
Diffstat (limited to 'lib/spawni.c')
-rw-r--r-- | lib/spawni.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/spawni.c b/lib/spawni.c index ab77dfe..05dc8b4 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -32,7 +32,7 @@ #if _LIBC || HAVE_PATHS_H # include <paths.h> #else -# define _PATH_BSHELL "/bin/sh" +# define _PATH_BSHELL BOURNE_SHELL #endif #include <signal.h> @@ -89,7 +89,7 @@ #define SPAWN_ERROR 127 -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ int @@ -284,6 +284,12 @@ __spawni (pid_t *pid, const char *file, /* The 'dup2' call failed. */ _exit (SPAWN_ERROR); break; + + case spawn_do_chdir: + if (chdir (action->action.chdir_action.path) < 0) + /* The 'chdir' call failed. */ + _exit (SPAWN_ERROR); + break; } } } |