<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 05/04/2022 à 14:34, Jacek Caban a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:551f158f-6eba-54a9-963e-c401ae73d79a@codeweavers.com">
<br>
Based on patches by Eric Pouech and Torge Matthies.
<br>
<br>
Signed-off-by: Jacek Caban <a class="moz-txt-link-rfc2396E" href="mailto:jacek@codeweavers.com"><jacek@codeweavers.com></a>
<br>
---
<br>
Both Eric and Torge sent patches for this and both used
ConsoleFlags for passing the information. While reviewing both
series, I was wondering if using ConsoleHandle instead would be
cleaner and I think it is. I ended up having a complete third
version...
<br>
<br>
Eric, Torge, I hope you will review this.
<br>
<br>
dlls/kernel32/tests/console.c | 3 ---
<br>
dlls/kernelbase/console.c | 21 +++++++++++++++------
<br>
dlls/kernelbase/process.c | 11 +++++++----
<br>
include/wine/condrv.h | 5 +++--
<br>
programs/conhost/conhost.c | 11 ++++++++---
<br>
programs/conhost/conhost.h | 1 +
<br>
6 files changed, 34 insertions(+), 18 deletions(-)
<br>
<br>
</blockquote>
<p><font face="Helvetica, Arial, sans-serif">two comments:</font></p>
<p><font face="Helvetica, Arial, sans-serif">- the value for
ConsoleHandle in child process for a GUI exec is not consistent
depending on passed flags:</font></p>
<p><font face="Helvetica, Arial, sans-serif"> + it's going to be 0
value when CREATE_NO_WINDOW is passed</font></p>
<p><font face="Helvetica, Arial, sans-serif"> + it's value is
untouched when 0 is passed (at least none of CREATE_NO_WINDOW,
DETACH_PROCESS, CREATE_NEW_CONSOLE)</font></p>
<p><font face="Helvetica, Arial, sans-serif">under windows, it's
always zeroed out (as the remaining todo_wine in
test_CreateProcessCUI shows)<br>
</font></p>
<font face="Helvetica, Arial, sans-serif">the attached (modified)
patch implements this behavior; but it's quite a change...<br>
</font>
<p><font face="Helvetica, Arial, sans-serif">- just for the record:
I wonder if in dlls/ntdll/unix/process.c we shouldn't also
detach from the unix controling terminal in
CONSOLE_HANDLE_ALLOC_NO_WINDOW case (but it would be impacting
with next patch as ctrl-c would no longer be working). so I'd
say no</font></p>
<p><font face="Helvetica, Arial, sans-serif"><br>
</font></p>
<p>this 'next' - aka third - patch, just creates a window less
console in some cases for an initial process and should fix (or at
least improve) a couple of open bugs</p>
<p>(to make it short, in scenario like "wine foo >& log <
/dev/null", it prevents foo and the subprocesses when in cui
subsystem to create visible consoles)<br>
</p>
<p>(just to share it here)<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://bugs.winehq.org/show_bug.cgi?id=52771">https://bugs.winehq.org/show_bug.cgi?id=52771</a></p>
<p><a class="moz-txt-link-freetext" href="https://bugs.winehq.org/show_bug.cgi?id=52761">https://bugs.winehq.org/show_bug.cgi?id=52761</a></p>
<p><a class="moz-txt-link-freetext" href="https://bugs.winehq.org/show_bug.cgi?id=52743">https://bugs.winehq.org/show_bug.cgi?id=52743</a></p>
<br>
</body>
</html>