shell32: Wait for process to finish when using flag SEE_MASK_NOASYNC

Carlos Palminha CARLOS.PALMINHA at synopsys.com
Tue Aug 8 12:28:19 CDT 2017



On 08-08-2017 17:33, Carlos Palminha wrote:
> 
> 
> On 08-08-2017 17:17, Huw Davies wrote:
>> On 8 Aug 2017, at 16:50, Carlos Palminha <CARLOS.PALMINHA at synopsys.com> wrote:
>>>
>>> Support for SEE_MASK_NOASYNC (same value as SEE_MASK_FLAG_DDEWAIT).
>>> Waits for process execution to finish before returning.
>>>
>>> Signed-off-by: Carlos Palminha <palminha at synopsys.com>
>>> ---
>>> dlls/shell32/shlexec.c | 17 ++++++++++++++++-
>>> 1 file changed, 16 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
>>> index c0ef53ab8e7..fe3eeeb5743 100644
>>> --- a/dlls/shell32/shlexec.c
>>> +++ b/dlls/shell32/shlexec.c
>>> @@ -344,6 +344,11 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
>>>     dwCreationFlags = CREATE_UNICODE_ENVIRONMENT;
>>>     if (!(psei->fMask & SEE_MASK_NO_CONSOLE))
>>>         dwCreationFlags |= CREATE_NEW_CONSOLE;
>>> +
>>> +    if(psei->fMask & SEE_MASK_NOASYNC) {
>>> +        dwCreationFlags |= SEE_MASK_NOASYNC;
>>> +    }
>>> +
>>>     if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, dwCreationFlags, env,
>>>                        lpDirectory, &startup, &info));
>>
>> Passing SEE_MASK_NOASYNC to CreateProcessW doesn’t look right…
>>
>> Huw.
> 
> Yep... looking further into CreateProcessW it seems the flags are different from SHELL_Execute.
> Waiting for the process to finish should open only at SHELL_Execute time.
> 
> If the flag is not passed to CreateProcessW it seems ok, do you agree?
> 
rerun the shlexec tests... seems ok now.
v2 will follow.




More information about the wine-devel mailing list