From: dirk Date: Sat, 11 Jan 2014 23:01:23 +0000 (+0000) Subject: Fixed launch: show: win: X-Git-Tag: 7.0.1-0~2899 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3755ab37645b985e0046cd3a4ccff1229c47e510;p=imagemagick Fixed launch: show: win: --- diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index 6a2115891..e76952235 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -2053,7 +2053,7 @@ MagickPrivate int NTSystemCommand(const char *command) status; MagickBooleanType - background_process; + asynchronous; PROCESS_INFORMATION process_info; @@ -2067,21 +2067,24 @@ MagickPrivate int NTSystemCommand(const char *command) startup_info.dwFlags=STARTF_USESHOWWINDOW; startup_info.wShowWindow=SW_SHOWMINNOACTIVE; (void) CopyMagickString(local_command,command,MaxTextExtent); - background_process=command[strlen(command)-1] == '&' ? MagickTrue : - MagickFalse; - if (background_process != MagickFalse) - local_command[strlen(command)-1]='\0'; - if (command[strlen(command)-1] == '|') - local_command[strlen(command)-1]='\0'; + asynchronous=command[strlen(command)-1] == '&' ? MagickTrue : MagickFalse; + if (asynchronous) + { + local_command[strlen(command)-1]='\0'; + startup_info.wShowWindow=SW_SHOWDEFAULT; + } else - startup_info.wShowWindow=SW_HIDE; + if (command[strlen(command)-1] == '|') + local_command[strlen(command)-1]='\0'; + else + startup_info.wShowWindow=SW_HIDE; status=CreateProcess((LPCTSTR) NULL,local_command,(LPSECURITY_ATTRIBUTES) NULL,(LPSECURITY_ATTRIBUTES) NULL,(BOOL) FALSE,(DWORD) NORMAL_PRIORITY_CLASS,(LPVOID) NULL,(LPCSTR) NULL,&startup_info, &process_info); if (status == 0) return(-1); - if (background_process != MagickFalse) + if (asynchronous != MagickFalse) return(status == 0); status=WaitForSingleObject(process_info.hProcess,INFINITE); if (status != WAIT_OBJECT_0)