delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/16/13:54:44

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:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; q=dns; s=default; b=bi2v/pwnbV3tvxRBtcZS//yUswIUjc
DWfWBmzdx4PquVfOD8ZP85/hkYC3hQ04aYUAwmqc50vSYz/QL1YEMyO9tNbN1dLm
H2LqCNI5lnoQRRWslLDDqgL84bEItS7d2XKxpxweIieKTjKGJHc4u2ZtC7ZJYAjd
BLtFHeynEaTDo=
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:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; s=default; bh=IYntziqWg8DPC/t3zZEi8BcwnQo=; b=xX0F
biYbL66VqNH9b8BxgDpKDK2dFY3o6q/mzjTW4qz6QM8n/vGey9Z2yyHcE3bZIhkn
hbJEmney45nVI7Cx/ef4111IGoJVc+P1ijpa/G6Vpl5Je2QU8qtFxr0/1hJ+LAsN
Ssozp3C/N4GKGfyXAW/bG6uVHQ1VBOTFbzVZNUA=
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.0 required=5.0 tests=AWL,BAYES_50,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Command echo
Date: Mon, 16 Nov 2015 10:54:08 -0800
Lines: 32
Message-ID: <n2d8oi$2vp$1@ger.gmane.org>
References: <91DCAC3CB99C724EB365BB64677FBE7B01BE4B AT MX204CL04 DOT corp DOT emc DOT com> <6CF2FC1279D0844C9357664DC5A08BA21BC24FE1 AT msgb09 DOT nih DOT gov>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
In-Reply-To: <6CF2FC1279D0844C9357664DC5A08BA21BC24FE1@msgb09.nih.gov>
X-IsSubscribed: yes

On 11/16/2015 08:40 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Gluszczak, Glenn sent the following at Monday, November 16, 2015 11:16 AM
>>
>> When I shell to cmd.exe, the commands I execute are echoed (not sure if
>> stdout or stderr). This doesn't happen under native cmd.exe. Is there a
>> variable that controls this? I only have CYGWIN=nodosfilewarning
>>
>> Notice the commands "dir" and "whoami" are emitted to the output.
>
> cmd.exe is in control of its own echoing.  Try starting as cmd /q
> cmd /?
> ...
> /Q      Turns echo off
> ...
>
> As to why cmd behaves differently when started under bash (even in a
> non-mintty window) than when started directly or under cmd ....
>
> Hope that helps.
>
> - Barry
>    Disclaimer: Statements made herein are not made on behalf of NIAID.

Mintty (and ssh, etc.) use pty's. cmd does not understand pty's. So if 
you run say Cygwin's bash from a cmd window and then start cmd you will 
not get the echoing. If, however, you start cmd from a bash shell that 
is in a mintty window then you're using pty's and you'll get echoing. 
Likewise if you run bash in a cmd window, then say ssh to another 
machine, you're now using pty's and you'll see the behavior again.
-- 
Andrew DeFaria
http://defaria.com


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