delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/07/31/19:18:31

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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=EgIYdYu
uTB3SalpQuT20ueJPmNHUvYYeV/ea6aiaoyg6mElMq/bBmI2sY9e+1M+GEq11qxv
WzAvrCrBfok6HvHYMUopsSRd18MQYRj3e3/tR/QDSs5o74X9kUogPAE5KtuW7sv4
WWrQIgr777M4uJr9arRwEqJFzhTyqkwgz2ZQ=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=jy/vQQANNIqqE
KFT3NYVjZMYhNQ=; b=Rooky+VuvrMFVJYuZG9DxsYWeiHni9HMnJKcwczQC0unC
+hCou6LnECtqRH8q9H/yfYBjjiUGChuhSl4UYclbIXGV7fxfxJa53iCsFh7jtcBc
2rJZbWfBuDbyEggPdwKJsb+VjXD7eNIumK+ozRjKw11LcCL7Ma+eYiFTspeP7M=
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-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:alternative
X-HELO: mail-ua0-f174.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=shMm/IbvwHvpylsK7imGtCuZByRXiB3qGqeCpa16Xpw=; b=J9QSEAG6Tn2Ai0pqsldsS4wy25r5GbGjXbM0P93aq8VueKMQRGdnnsNrsjvEivMvw5 ov3gAvPPOFvFG3BFBUbw03lRPubqtm7ypLGEc5kZhaQAeU2QrfCBGMPyWUWwZkP4iHVN mTItA49OWx0IAMznUCDO4zzVxbgZDF2v0stew/e4avqk7iaT4yh8WU30ZLW10Re1gPJu Ejem/YtN9XO5wDaEsiEstrnrgDLueGGTHyl6ax4gEyy3UPXAUwvzCsoBQvZuG8CRQ23G cf+2QzWN03rxX2R0RrJLBU0e8F9lhJ25PzPh33HX6wmJXZjPq0lyBfKpZGVxqrDO+v3u Sy/w==
MIME-Version: 1.0
In-Reply-To: <CAA5t8Vpezn7qy-rnLPyn0Xb33ybUR2oGzHRfQT7+_3SjzH0bDQ@mail.gmail.com>
References: <CAA5t8VqgNm+-wGn+iF-LtXUoFKL9+m=zH4=A959B0YsMGEqVmw AT mail DOT gmail DOT com> <6646b33b-ed7f-1078-6754-12259bf094e7 AT towo DOT net> <CAA5t8VoBPcSK8cHc+xuea-LREfV5f-H0qj034EvmzavbYCguJQ AT mail DOT gmail DOT com> <CAA5t8Vpezn7qy-rnLPyn0Xb33ybUR2oGzHRfQT7+_3SjzH0bDQ AT mail DOT gmail DOT com>
From: David Karr <davidmichaelkarr AT gmail DOT com>
Date: Tue, 31 Jul 2018 16:18:14 -0700
Message-ID: <CAA5t8VoEiOshY_J1Qezbu_a4NgCtdS4CJ2y6_rGc1usTU6afRw@mail.gmail.com>
Subject: Re: Any reason Cygwin might prevent kubectl exec from showing shell prompt?
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
X-IsSubscribed: yes

On Tue, Jul 31, 2018 at 1:34 PM, David Karr <davidmichaelkarr AT gmail DOT com>
wrote:

> And I note that I tried running the same script from a Linux VM on my
> laptop, and it doesn't have this symptom, so it does seem to have something
> to do with Cygwin or Windows.
>
> On Tue, Jul 31, 2018 at 1:15 PM, David Karr <davidmichaelkarr AT gmail DOT com>
> wrote:
>
>> On Tue, Jul 31, 2018 at 9:27 AM, Thomas Wolff <towo AT towo DOT net> wrote:
>>
>>> Am 31.07.2018 um 18:15 schrieb David Karr:
>>>
>>>> I really have no idea if this is a Cygwin problem, just trying to
>>>> eliminate variables.
>>>>
>>>> I believe my Cygwin version is "2.9.0(0.318/5/3)" (from the uname
>>>> string).
>>>>
>>>>  From a mintty window, I use a variation of "kubectl exec" in a script
>>>> to
>>>> run a shell in a container in a pod.  It appears to run, and I can run
>>>> processes from that shell in the container, but the curious thing is
>>>> that I
>>>> never get a shell prompt from the container.  I thought I had gotten
>>>> this
>>>> to work before, in the same k8s cluster, but I'm not certain.
>>>>
>>> This may be an instance of the pty incompatibility issue of native
>>> Windows programs (which I assume kubectl to be).
>>> Try `winpty kubectl`, after installing winpty, that is.
>>> Maybe someone should put up a winpty cygwin package; maybe I should do
>>> it...
>>>
>>
>> I hope this isn't it.  This is really the only issue I have with running
>> kubectl in Cygwin.  It takes and outputs text perfectly fine.  I use pipes
>> for input and output with no issues.  When I run kubectl with winpty, it
>> changes the text encoding in ways I don't understand yet.
>>
>
Ok. It's a hack, but I guess it will work.  I execute kubectl with a shell
wrapper anyway, so now if "$1" == "exec", I prefix it with "winpty".  This
allows all the other operations to avoid that complexity, but still get a
shell prompt on exedc.


>>
>>
>>>
>>> The other curious thing I see is that if I execute "echo $PS1" in the
>>>> shell
>>>> in the container, it gives me a reasonable response ("\w \$"), but if I
>>>> instead do "env | grep PS1", it returns nothing.
>>>>
>>> You may have set PS1 in your .profile (or .bashrc) but not exported it
>>> into the environment (export PS1).
>>>
>>
>> I guess that makes sense. It appears to be irrelevant to my problem.
>>
>>
>

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