Error "fatal: write failure on 'stdout': No error" in native console

Duncan Roe duncan_roe@optusnet.com.au
Sat Aug 17 01:44:00 GMT 2019


Hi Audrey,

On Fri, Aug 16, 2019 at 01:36:58PM +0300, Andrey Repin wrote:
> Greetings, All!
>
> I'm trying to resolve the problem at my new workplace, which seems to be
> affecting the ability to use git with VS Code.
> It just does not see the repo, no matter if I point its nose directly to the
> directory.
>
> When toying around the terminal, I noticed that calling simple
>
> > git log | head -1
> commit 8f4c6f50a4c6becee2c6007fdb2e67be70fc06b6
> fatal: write failure on 'stdout': No error
>
> Bummer. I can't replicate it on my home system, which have more or less
> identical setup.
> Any pointers?
>
> P.S.
> This all happens on Win7 PRO.
>
>
> --
> With best regards,
> Andrey Repin
> Friday, August 16, 2019 13:32:30
>
> Sorry for my terrible english...

Cheap & cheerful solution:

> git log | head -1 2>/dev/null

You got your 1 line of output.

The head program closes stdin after reading "n" lines. That sends SIGPIPE to the
previous process, or EPIPE to write(), if SIGPIPE is caught. I suspect you are
seeing the latter, but with errno not getting set properly for some reason.

If you would care to experiment with a simple C program that outputs a few lines
and try catching SIGPIPE you may well come up with an STC.

Cheers ... Duncan.

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



More information about the Cygwin mailing list