Question on launching unix binaries

Ann and Jason Edmeades us at edmeades.me.uk
Tue Sep 4 17:10:25 CDT 2018


Hello,

I've been working through the 'cmd' component bugs and am looking into
bug#37780 (which relates to an old wontfix bug#34730) and wanted to get
confirmation from an expert. This bug complains that if you manually create
a file with a .exe extension, mark it executable (from Unix permissions
perspective) and contains shell script (#!/bin/bash etc) then cmd.exe can
launch the process but doesn't wait for it to complete.  This is true and
reproducible - see 34730 for extensive details including AJ saying that is
an ok to launch unix scripts (comment #23)

Debugging this, it would appear our cmd code decides not to wait (which is
trivial to fix), but even if we try to wait we cannot - It would appear
that CreateProcess for such a '.exe' file works, BUT it does not return a
valid handle which can be waited on. I cannot say I am massively surprised
by this but without a valid waitable handle, we obviously cannot give the
user what they want

Questions/thoughts
- Is it desirable to do anything about this or just close wontfix, ie
launching unix shell is asynchronous?
- Is it even possible to return a valid handle from CreateProcess that we
can WaitForSingleObject on to know when the unix process completes?

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180904/5b6baeb3/attachment.html>


More information about the wine-devel mailing list