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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SmZg0X/ZJ7VD2uv7 ORHoKlRkXOopWThrA/otl/LXkhRmxtRSQvc1OLih2w6t/LtABt9ZPuFARqooYfGu 5ndmpk66/T+wnmJ+h/8A7peErAbUgZka3hEGqCm0sYOnuB/00nGTcO6OzBx6EPhe LHkazgAEs8VmXNNIYI32NLcvC0w= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=/vTm7S0dR2j+gMqGheUt6L QLhZI=; b=TAeNoLn4NOXll2AqTBJ1yZJtyYFEDS6nZ+a9lcOg9HcqwB1F9nBJju kRrSfAiRVdfC4EQ8qGS+R5F6istcvguAObCaNTSGQZA4bQpD7K0Sd6L3Hi0fqTRv tIIzXeuwEk5M28x4bj0hR6IGt/GTMoWzup16UtYnmExs82p3zf2bw= 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-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=ver, canada, Canada, H*R:D*ca X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: how is cygstart different from cmd /c or how to have cygstart start 'inline'? To: cygwin AT cygwin DOT com References: <5C1C973B DOT 7050509 AT tlinx DOT org> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <42f063c4-2884-f118-4744-259cd229e77f@SystematicSw.ab.ca> Date: Fri, 21 Dec 2018 06:15:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <5C1C973B.7050509@tlinx.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Note-from-DJ: This may be spam On 2018-12-21 00:33, L A Walsh wrote: > Got a program that starts under cygstart, but I'd like to be able to start it > without starting up the program in a new window..so was trying cmd /c. See: https://github.com/mintty/mintty/wiki/Tips#inputoutput-interaction-with-alien-programs > I compared env's and noted both PATH and TMP had been converted back to the > backslash using case, so I did that manually: > But no luck in launching (cygstart case works): > cd "$ldir" && { >    if ((usecmd)); then >        'c:/windows/system32/cmd.exe' /c "$lpath" "${args[@]}" >    else >        cygstart "$lpath" "${args[@]}" >    fi > } > So what else does cygstart do that I might setup before a "cmd /c" to get the > target to run? START - Starts a separate window to run a specified program or command > Or anyway to have cygstart run the command with its output in the current > window? If it's a console cmd it should run under a term without any problems: $ cmd /c ver Microsoft Windows [Version 10.0.17134.471] or you may need to use https://github.com/rprichard/winpty - allows running Windows console programs under mintty or Cygwin's sshd with properly-functioning input and output by starting winpty-agent with a hidden console window, which bridges between the console API and terminal input/output escape codes, polls the hidden console's screen buffer for changes and generates a corresponding stream of output. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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