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: 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=-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: References: <6646b33b-ed7f-1078-6754-12259bf094e7 AT towo DOT net> From: David Karr Date: Tue, 31 Jul 2018 16:18:14 -0700 Message-ID: Subject: Re: Any reason Cygwin might prevent kubectl exec from showing shell prompt? To: The Cygwin Mailing List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes On Tue, Jul 31, 2018 at 1:34 PM, David Karr 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 > wrote: > >> On Tue, Jul 31, 2018 at 9:27 AM, Thomas Wolff 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