This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Use of spawnvp function makes console window appear.
- From: Kaz Kylheku <kaz at kylheku dot com>
- To: Cygwin <cygwin at cygwin dot com>
- Date: Fri, 01 Jul 2016 13:53:31 -0700
- Subject: Re: Use of spawnvp function makes console window appear.
- Authentication-results: sourceware.org; auth=none
- References: <65d07c575914c634ad9145d25005223a at mail dot kylheku dot com> <322d75d40a801c815572887971a85781 at mail dot kylheku dot com>
On July 1, 2016 Corinna Vinschen wrote:
On Jun 30 20:38, Kaz Kylheku wrote:
> I tracked this down to the fhandler_console::need_invisible() call in
> child_info_spawn::worker().
>
> Whatever that is supposed to do is not working properly because
> the invisible window is perfectly visible.
Try starting the process detached:
spawnvp(_P_DETACH, argv[0], argv);
Without a doubt that will work, since the call to
fhandler_console::need_invisible
is conditional on the mode not being _P_DETACH.
The problem is that sometimes you don't want this detach behavior.
Secondly, this child_info_spawn::worker is used underneath various
functions: exec*, spawn*, popen, system. Not all these can pass through
_P_DETACH at all.
(I'm only using spawnvp for the sake of producing a minimal test case).
Cheers ...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple