aboutsummaryrefslogtreecommitdiff
path: root/jim-exec.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-11-07 09:05:31 +1000
committerSteve Bennett <steveb@workware.net.au>2013-11-07 09:27:54 +1000
commitbcec4895d4d14ecd70fb02ad92343046ca3f3ef8 (patch)
treeb6e31ab021d5ebbc1780b15692e9942619c3b2fd /jim-exec.c
parent92aaf45440c5ae9643d8782279adedf937d16854 (diff)
downloadjimtcl-bcec4895d4d14ecd70fb02ad92343046ca3f3ef8.zip
jimtcl-bcec4895d4d14ecd70fb02ad92343046ca3f3ef8.tar.gz
jimtcl-bcec4895d4d14ecd70fb02ad92343046ca3f3ef8.tar.bz2
Fix jim-exec.c compiler warnings on mingw
Signed-off-by: Steve Bennett <steveb@workware.net.au>
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();