delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/01/16:54:03

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; q=dns; s=default; b=QfkPxtX2srt8K1mgmCLwIMj6jby9Mp5
knvV2y29WUXWaiKvGCXDLX4wBSIv8rCkBEtDKIZ/U6Q420Is5ZwmxTMmObcjI+va
lkOV2u1kzynPjUzS+I+f1HVd1S1rCkcHTCnNSRe5CmUqHlCWlQsr5lxUD9C3d1KP
gnNThNzErLLE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; s=default; bh=FGFCPLLtlxsZs2+jnuiqSPiur38=; b=yZC6e
Jc/wblt5UpD89Ot8na2yDGubpar8yrfK61hMmlWVcd8SzEo6i2KgRbGsBus6NIK1
rclyPQFd9W3oJnBe9umTsiY2vCrgnZPdmmjpNQ80uEesO9Iv3H0PeAm//6LPbLlG
BiFUFfiDF+dOqP/O3GO6hr4ITojCok4nfwzccs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:64.59.134.9, H*RU:64.59.134.9, underneath, Hx-spam-relays-external:shaw.ca
X-HELO: smtp-out-no.shaw.ca
X-Authority-Analysis: v=2.2 cv=P7p4vWIu c=1 sm=1 tr=0 a=WiYoHcCliNeVponEdG0Ckg==:117 a=WiYoHcCliNeVponEdG0Ckg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=cAmyUtKerLwA:10 a=GdwPnjlz2FrZbflzzXcA:9
To: Cygwin <cygwin AT cygwin DOT com>
Subject: Re: Use of spawnvp function makes console window appear.
X-PHP-Originating-Script: 501:rcmail.php
MIME-Version: 1.0
Date: Fri, 01 Jul 2016 13:53:31 -0700
From: Kaz Kylheku <kaz AT kylheku DOT com>
In-Reply-To: <322d75d40a801c815572887971a85781@mail.kylheku.com>
References: <65d07c575914c634ad9145d25005223a AT mail DOT kylheku DOT com> <322d75d40a801c815572887971a85781 AT mail DOT kylheku DOT com>
Message-ID: <64ec1c533eb6bbed393b0940d2f2c9e8@mail.kylheku.com>
X-Sender: kaz AT kylheku DOT com
User-Agent: Roundcube Webmail/0.9.2
X-CMAE-Envelope: MS4wfHGw+vuRX93+UCJ+zV6ihYTFRbCJjTbOkDbqwWsWd+y5Ger6uSWVw+efAYNMs/6ZNFoPd7AukvSrl0LCUCT9Wn/3tePcpYfEKZJIQararTbICAY7v6Ob du2TqA/LMoEf7jiI66fXilfcmOwDv1B0Wr/R3pWpxCAlcNNACz4Bi1LW
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u61KrxFf003336

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019