From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9366 invoked by alias); 5 Dec 2018 22:25:21 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 9349 invoked by uid 89); 5 Dec 2018 22:25:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Problem, H*c:alternative, query X-HELO: mail-ed1-f49.google.com Received: from mail-ed1-f49.google.com (HELO mail-ed1-f49.google.com) (209.85.208.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Dec 2018 22:25:16 +0000 Received: by mail-ed1-f49.google.com with SMTP id j6so18395428edp.9 for ; Wed, 05 Dec 2018 14:25:16 -0800 (PST) MIME-Version: 1.0 References: <6cc83f4b-b0b1-d5c9-8d59-94c51382e4e3@gmail.com> <37f0fb9b-5d70-ea1f-b1fc-1cd3f3ad0fa7@gmail.com> <0e717bbe-df37-9fc5-d514-d1792c5778be@gmail.com> In-Reply-To: <0e717bbe-df37-9fc5-d514-d1792c5778be@gmail.com> From: David Karr Date: Wed, 05 Dec 2018 22:25:00 -0000 Message-ID: Subject: Re: Redirecting stderr to stdout through pipe doesn't work the way it does in Linux To: The Cygwin Mailing List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00057.txt.bz2 On Wed, Dec 5, 2018 at 11:44 AM cyg Simple wrote: > On 12/5/2018 1:33 PM, David Karr wrote: > > On Wed, Dec 5, 2018 at 9:43 AM cyg Simple wrote: > > > >> > >> Your query got me interested in looking and I believe that winpty needs > >> to be at the front of all the commands so that it can communicate with > >> mintty properly. To overcome the need to remember you could add an > >> alias to execute the command; `alias FOO="winpty FOO"'. > >> > > > > Sigh. What a mess. I can't get this to work. It was easy enough when a > > single script has to execute "kubectl", having "winpty" prefix that call, > > but I'm trying to write a script that calls that other script, and even > in > > a pipeline. > > > > If I have "winpty" prefix the call to the script that calls "kubectl", it > > says: > > > > winpty: error: cannot start '...': Not found in PATH > > > > When I changed it so it references the absolute path, it then says "%1 is > > not a valid Win32 application. (error 0xc1)". So, this makes it clear > that > > winpty can only directly execute Windows applications, which makes sense. > > > > So how can I call a Windows application from more than just the top-level > > script? > > > > What does cygcheck say about your winpty? You are using the Cygwin > compiled version, correct? > By "say", I assume you mean the output from running "cygcheck winpty"? This is what I get: Found: C:\Users\myuid\frameworks\winpty-0.4.3-cygwin-2.8.0-x64\bin\winpty.exe C:\Users\myuid\frameworks\winpty-0.4.3-cygwin-2.8.0-x64\bin\winpty.exe C:\cygwin64\bin\cygwin1.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll C:\Users\myuid\frameworks\winpty-0.4.3-cygwin-2.8.0-x64\bin\winpty.dll C:\Windows\system32\ADVAPI32.dll C:\Windows\system32\msvcrt.dll C:\Windows\system32\API-MS-Win-Core-Console-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-DateTime-L1-1-0.dll C:\Windows\system32\API-MS-WIN-Service-Core-L1-1-0.dll C:\Windows\system32\API-MS-WIN-Service-winsvc-L1-1-0.dll C:\Windows\system32\API-MS-WIN-Service-Management-L1-1-0.dll C:\Windows\system32\API-MS-WIN-Service-Management-L2-1-0.dll C:\Windows\system32\API-MS-Win-Core-LocalRegistry-L1-1-0.dll C:\Windows\system32\RPCRT4.dll C:\Windows\system32\API-MS-Win-Core-Interlocked-L1-1-0.dll C:\Windows\system32\API-MS-Win-Core-DelayLoad-L1-1-0.dll C:\Windows\system32\USER32.dll C:\Windows\system32\GDI32.dll C:\Windows\system32\LPK.dll C:\Windows\system32\USP10.dll > > -- > cyg Simple > > -- > 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 > > -- 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