[Bug 37780] CreateProcess does not return handles which can be used to wait on a Unix process ending (was cmd doesnt wait for bash command to end)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Sep 10 17:25:02 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=37780

Jason Edmeades <us at edmeades.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|cmd does not wait for bash  |CreateProcess does not
                   |script completion           |return handles which can be
                   |                            |used to wait on a Unix
                   |                            |process ending (was cmd
                   |                            |doesnt wait for bash
                   |                            |command to end)
          Component|cmd                         |kernel32

--- Comment #3 from Jason Edmeades <us at edmeades.me.uk> ---
Working through this, the root cause here is CreateProcess in kernel32 ends up
calling fork_and_exec where it basically uses two forks to the unix binary,
effectively producing a grandchild which is detatched and left running, and a
child which is waited on and reaped. 

For cmd to be able to wait for the unix binary to end, CreateProcess needs to
support it. This might be theoretically possible (eg the grandchild could pass
the pid back to the original thread, and wine server could wrap it in a
'special handle' somehow, but a non-windows process is quite different from a
windows one and the semantics will differ.

I'm reassigning this over to kernel32 for the createprocess side of things. If
they get implemented, the cmd side is trivial, but I strongly suspect the end
result will be a wontfix

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list