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:message-id; q=dns; s= default; b=PxvkPvvRkNRuB/v4nm1mGk0vjfSnTz2seHJPWf5h25WcTc0MsrhSJ hUcMQiEG8oTIUo1KZn+43PQWZ0lbLz7pUAvBoguJx9RCSxCdxluNzIBwoWL/pKKx 6DBpoaC/Ukoc1HyHoI1JLnOArYyVfEm50XihLsV5fCR1OQsYcz+xnI= 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:message-id; s=default; bh=E HfqRfT4bgmHPqsWCC9Vhp4sIKo=; b=XMLPL//nnhfoe01gP7YgtBCNTpDxx4Xar 4E4wlD71EFSj/9Pam1tNaIb1vdx8I0bHDpa2V/G+l4qj4XKbg0DCsgPUGwXuFVz+ nlUVNpdDnbguAhtyIOi07sqAmEQpbiOlJcay/slH7WSp2Ib87c4u/XT7f8HrFXnT vop5TNK5o0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=4.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:shaw.ca, H*r:shaw.ca, H*RU:shaw.ca, H*MI:kylheku X-HELO: smtp-out-so.shaw.ca X-Authority-Analysis: v=2.2 cv=QZUkhYTv c=1 sm=1 tr=0 a=WiYoHcCliNeVponEdG0Ckg==:117 a=WiYoHcCliNeVponEdG0Ckg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=pD_ry4oyNxEA:10 a=3qWQcTkOwLzBPCMEqnYA:9 To: Cygwin Subject: Use of spawnvp function makes console window appear. X-PHP-Originating-Script: 501:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Wed, 29 Jun 2016 15:28:07 -0700 From: Kaz Kylheku Message-ID: <65d07c575914c634ad9145d25005223a@mail.kylheku.com> X-Sender: kaz AT kylheku DOT com User-Agent: Roundcube Webmail/0.9.2 X-CMAE-Envelope: MS4wfIQ1DilwUyiqA3Cuj7tRS7oiXtqHMrC+HteSAXOUzNMia95poFLlXSu3j+UdVXt4LjnjW7ESvybtKM4sWhMtccbbbdzgIh+PniHJzsHYhM+h0YC2fKk6 MiWg60UxEgtOFpFKAodOnLn+VeHubAKakdDqoEu3+rmShjVI3o210erp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u5TMSTdK008142 Hi all, I've encountered a strange behavior. When a Cygwin C application that is compiled with "-mwindows" tries to spawn another program, that application suddenly gets a console window! Here is a simple, complete, repro case, that demonstrates the problem under Cygwin 2.5.2, on Windows 7: #include #include int main(void) { const char * const argv[] = { "c:/Windows/System32/notepad.exe", 0 }; Sleep(5000); return spawnvp(_P_WAIT, argv[0], argv); } This is compiled as: gcc -mwindows spawn.c -o spawn If we launch this from the Windows Shell, then, correctly, it runs with no console window. Nothing appears on the display for five seconds, while it sits in the Sleep call. Then, a console window opens with spawn.exe in its title, immediately followed by the Notepad window over top. What the heck? -- 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