From 6b1770932e88c6ebf0c53ff9f5aebcaae8d66af8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 1 Jul 2003 13:27:42 -0400 Subject: [PATCH] ERR: Should use %p to pass HANDLE values on a command line, not %d. --- Source/kwsys/ProcessFwd9x.c | 4 ++-- Source/kwsys/ProcessWin32.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/kwsys/ProcessFwd9x.c b/Source/kwsys/ProcessFwd9x.c index 0b8805471..b837bf54d 100644 --- a/Source/kwsys/ProcessFwd9x.c +++ b/Source/kwsys/ProcessFwd9x.c @@ -72,12 +72,12 @@ int main() /* Parse the error pipe handle. */ while(*cmdLine && *cmdLine == ' ') { ++cmdLine; } - sscanf(cmdLine, "%d", &errorPipe); + sscanf(cmdLine, "%p", &errorPipe); /* Parse the kill event handle. */ while(*cmdLine && *cmdLine != ' ') { ++cmdLine; } while(*cmdLine && *cmdLine == ' ') { ++cmdLine; } - sscanf(cmdLine, "%d", &killEvent); + sscanf(cmdLine, "%p", &killEvent); /* Skip to the beginning of the command line of the real child. */ while(*cmdLine && *cmdLine != ' ') { ++cmdLine; } diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 488570b50..1fcdacd1e 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -680,7 +680,7 @@ void kwsysProcess_Execute(kwsysProcess* cp) /* The forwarding executable is given a handle to the error pipe and a handle to the kill event. */ cp->RealCommand = malloc(strlen(cp->Win9x)+strlen(cp->Command)+100); - sprintf(cp->RealCommand, "%s %d %d %s", cp->Win9x, + sprintf(cp->RealCommand, "%s %p %p %s", cp->Win9x, cp->Pipe[CMPE_PIPE_ERROR].Write, cp->Win9xKillEvent, cp->Command); }