From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Redirecting stderr to stdout through pipe doesn't work the way it does in Linux
Date: Thu, 06 Dec 2018 16:21:00 -0000 [thread overview]
Message-ID: <89d6db1e-04cb-6027-4275-1a8777be6952@gmail.com> (raw)
In-Reply-To: <CAA5t8VqBOOhDXCEMC79LhFyT=tZptpZv2bLMwsWUDp7V705Q+Q@mail.gmail.com>
On 12/5/2018 5:25 PM, David Karr wrote:
> On Wed, Dec 5, 2018 at 11:44 AM cyg Simple <cygsimple@gmail.com> wrote:
>
>> On 12/5/2018 1:33 PM, David Karr wrote:
>>> On Wed, Dec 5, 2018 at 9:43 AM cyg Simple <cygsimple@gmail.com> 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:
>
Yes that is what I meant by my colloquial phrase.
> 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
>
I see nothing wrong here, time to ask winpty community what might be wrong.
--
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
next prev parent reply other threads:[~2018-12-06 16:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 20:41 David Karr
2018-12-04 20:52 ` Marco Atzeri
2018-12-04 21:39 ` cyg Simple
2018-12-05 14:58 ` David Karr
2018-12-05 15:11 ` David Karr
2018-12-05 17:42 ` cyg Simple
2018-12-05 18:33 ` David Karr
2018-12-05 19:43 ` cyg Simple
2018-12-05 22:25 ` David Karr
2018-12-06 16:21 ` cyg Simple [this message]
2018-12-06 0:20 ` Andrey Repin
2018-12-06 1:03 ` David Karr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89d6db1e-04cb-6027-4275-1a8777be6952@gmail.com \
--to=cygsimple@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).