All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: jeffhost@microsoft.com, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/2] Fixup for js/mingw-o-append
Date: Mon, 10 Sep 2018 10:05:20 -0700 (PDT)	[thread overview]
Message-ID: <pull.35.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.35.git.gitgitgadget@gmail.com>

The recent change mingw O_APPEND change breaks writing to named pipes on
Windows. The first commit adds a new test to confirm the breakage and the
second commit fixes the problem. These could be squashed together or we can
just keep the fix and omit the test if that would be better.

d641097589 (js/mingw-o-append) mingw: enable atomic O_APPEND

The new mingw_open_append() routine successfully opens the client side of
the named pipe, but the first write() to it fails with EBADF. Adding the
FILE_WRITE_DATA corrects the problem.

 Signed-off-by: Jeff Hostetler jeffhost@microsoft.com
[jeffhost@microsoft.com]

Cc: j6t@kdbg.orgCc: johannes.schindelin@gmx.deCc: gitster@pobox.comCc: 
peff@peff.net

Jeff Hostetler (2):
  t0051: test GIT_TRACE to a windows named pipe
  mingw: fix mingw_open_append to work with named pipes

 Makefile                           |  1 +
 compat/mingw.c                     | 38 ++++++++++++++--
 t/helper/test-tool.c               |  3 ++
 t/helper/test-tool.h               |  3 ++
 t/helper/test-windows-named-pipe.c | 72 ++++++++++++++++++++++++++++++
 t/t0051-windows-named-pipe.sh      | 17 +++++++
 6 files changed, 131 insertions(+), 3 deletions(-)
 create mode 100644 t/helper/test-windows-named-pipe.c
 create mode 100755 t/t0051-windows-named-pipe.sh


base-commit: d641097589160eb795127d8dbcb14c877c217b60
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-35%2Fjeffhostetler%2Ffixup-mingw-o-append-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-35/jeffhostetler/fixup-mingw-o-append-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/35

Range-diff vs v1:

 1:  03453cb521 ! 1:  ecb30eb47c t0051: test GIT_TRACE to a windows named pipe
     @@ -140,7 +140,7 @@
      +
      +. ./test-lib.sh
      +
     -+test_expect_success MINGW 'o_append write to named pipe' '
     ++test_expect_failure MINGW 'o_append write to named pipe' '
      +	GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 &&
      +	{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&
      +	pid=$! &&
 2:  f433937d55 < -:  ---------- mingw: fix mingw_open_append to work with named pipes
 -:  ---------- > 2:  f0361dd306 mingw: fix mingw_open_append to work with named pipes

-- 
gitgitgadget

  parent reply	other threads:[~2018-09-10 17:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 18:19 [PATCH 0/2] Fixup for js/mingw-o-append Jeff Hostetler via GitGitGadget
2018-09-07 18:19 ` [PATCH 1/2] t0051: test GIT_TRACE to a windows named pipe Jeff Hostetler via GitGitGadget
2018-09-09  7:28   ` Sebastian Schuberth
2018-09-10 13:21     ` Jeff Hostetler
2018-09-07 18:19 ` [PATCH 2/2] mingw: fix mingw_open_append to work with named pipes Jeff Hostetler via GitGitGadget
2018-09-08  9:26   ` Johannes Sixt
2018-09-08 18:31     ` Johannes Sixt
2018-09-10 15:44       ` Jeff Hostetler
2018-09-10 16:42         ` Junio C Hamano
2018-09-10 16:55           ` Jeff Hostetler
2018-09-07 18:36 ` [PATCH 0/2] Fixup for js/mingw-o-append Jeff Hostetler
2018-09-10 17:05 ` Jeff Hostetler via GitGitGadget [this message]
2018-09-10 17:05   ` [PATCH v2 1/2] t0051: test GIT_TRACE to a windows named pipe Jeff Hostetler via GitGitGadget
2018-09-10 17:05   ` [PATCH v2 2/2] mingw: fix mingw_open_append to work with named pipes Jeff Hostetler via GitGitGadget
2018-09-10 19:45     ` Johannes Sixt
2018-09-10 20:07       ` Jeff Hostetler
2018-09-10 22:00       ` Junio C Hamano
2018-09-11 14:25         ` Jeff Hostetler
2018-09-11 20:05   ` [PATCH v3 0/2] Fixup for js/mingw-o-append Jeff Hostetler via GitGitGadget
2018-09-11 20:06     ` [PATCH v3 1/2] t0051: test GIT_TRACE to a windows named pipe Jeff Hostetler via GitGitGadget
2018-09-11 20:06     ` [PATCH v3 2/2] mingw: fix mingw_open_append to work with named pipes Jeff Hostetler via GitGitGadget

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=pull.35.v2.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.