aboutsummaryrefslogtreecommitdiff
path: root/jim-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-exec.c')
-rw-r--r--jim-exec.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/jim-exec.c b/jim-exec.c
index 32db585..9d0e4b4 100644
--- a/jim-exec.c
+++ b/jim-exec.c
@@ -943,6 +943,11 @@ badargs:
outputId = pipeIds[1];
}
+ /* Need to do this befor vfork() */
+ if (pipe_dup_err) {
+ errorId = outputId;
+ }
+
/* Now fork the child */
#ifdef __MINGW32__
@@ -963,11 +968,6 @@ badargs:
(void)signal(SIGPIPE, SIG_IGN);
}
- /* Need to do this befor vfork() */
- if (pipe_dup_err) {
- errorId = outputId;
- }
-
/*
* Make a new process and enter it into the table if the fork
* is successful.
@@ -1480,14 +1480,12 @@ JimStartWinProcess(Jim_Interp *interp, char **argv, char *env, fdtype inputId, f
PROCESS_INFORMATION procInfo;
HANDLE hProcess, h;
char execPath[MAX_PATH];
- char *originalName;
pidtype pid = JIM_BAD_PID;
Jim_Obj *cmdLineObj;
if (JimWinFindExecutable(argv[0], execPath) < 0) {
return JIM_BAD_PID;
}
- originalName = argv[0];
argv[0] = execPath;
hProcess = GetCurrentProcess();