delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/05/18:44:24

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EAOirpU+cKEcV/2dsb2JhbABFsnKBB4IMAQEBBBIoTwIBCA0LHAIFCx8TFwENAQEEGxqHbJ1unAWKfyiFFWMEjTiOXooqgwWBPA
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Sat, 5 May 2012 18:43:50 -0400
Subject: RE: 'cmd /C start cmd' no longer non-blocking (base-cygwin 3.1-1), but used to work (in base-cygwin 3.0-1)
Message-ID: <0105D5C1E0353146B1B222348B0411A20A6E685C27@NIHMLBX02.nih.gov>
References: <4C337258C4FF8145842DBA13279005D882F882 AT 039-SN1MPN1-001 DOT 039d DOT mgd DOT msft DOT net> <759745567 DOT 20120505153106 AT mtu-net DOT ru>
In-Reply-To: <759745567.20120505153106@mtu-net.ru>
MIME-Version: 1.0
X-IsSubscribed: yes
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q45MiKOr021267

Andrey Repin sent the following at Saturday, May 05, 2012 7:31 AM
> On 5/4/2012 3:43 PM, Petrisor Eddy-Marian-B36037 wrote:
>> I am using at work cygwin on various machines (XP and Windows 7) and made
>> several scripts that use gnu utilities from cygwin. One of those is a script
>> that starts in paralel instances of cmd various parts of a build system
>> through a sh script that invokes 'cmd /C start ...'
>
>Why? Aren't your default ComSpec isn't CMD already?
>> to start those parts of the build system in a non-blocking fashion.
>
>If it's (b?a|tc)?sh script - use backgrounding (The &) If it's a CMD
>script - use backgrounding (START "" /B "command" args) Problem solved.
>> Recently, on one of the machines which had its cygwin installation upgraded,
>> I have observed that the cmd instances do not start in a non-blocking
>> fashion anymore, but instead wait for the process to finish.
>
>> To be more precise, following the following steps should lead to two
>> interactive windows, one with the sh prompt and one with the cmd prompt,
>> both waiting for user input:
>> 1 - start a cygwin (or sh) command window
>> 2 - type "cmd /C start cmd"
>
>> Expected result:
>> Two interactive and usable windows, one with the sh prompt, one with the cmd
>> prompt, both waiting for user input.
>
>For new interactive windows from withing Cygwin shell - use run program.
>And again, backgrounding, if necessary.
>> Actual result:
>> Two windows, one with sh and one with cmd, Cygwin/sh window blocked and
>>waiting for the cmd window to finish.

Question #1:

Why not use cygstart?

The only reason I ever use cmd /c start is to use the /wait option of start,
which is exactly not what you want.  (Indeed, I wouldn't mind it if a --wait
option was added to cygstart.  Hint.  Hint.)

Question #1.1:

Are you using the /wait option of cmd /c start?

Question #2:

Is there a reason that cygstart wasn't suggested earlier?

(That's not intended as a criticism.  I just want to know why in case there
was one.)

Thanks,

- Barry
  Disclaimer:  Statements made herein are not made on behalf of NIAID.


--
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