https://bugs.winehq.org/show_bug.cgi?id=37780
Jason Edmeades us@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@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