From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Andreas Schwab <schwab@suse.de>, Johannes Sixt <j6t@kdbg.org>,
git@vger.kernel.org
Subject: Re: [PATCH v2] t6026-merge-attr: don't fail if sleep exits early
Date: Thu, 10 Nov 2016 18:03:56 -0500 [thread overview]
Message-ID: <20161110230356.3is53qysegv637hf@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq1syj54j9.fsf@gitster.mtv.corp.google.com>
On Thu, Nov 10, 2016 at 02:55:06PM -0800, Junio C Hamano wrote:
> If we ensure that the process is still running, then such a check is
> a good belt-and-suspenders way to catch a breakage in the mechanism
> we choose to ensure it. So probably we can require that the kill in
> the "when finished" part to actually send a signal to a process that
> is still running.
>
> Is there an equivalent to pause(2) available to shell scripts? I
> really hate a single "sleep 3600" or anything with a magic number.
I think it is usually spelled "read <some-fifo", but we can't use FIFOs
here because Windows doesn't have them. You could probably do something
with "read <&9" and set up descriptor 9 in the test code. But frankly,
that gets complex pretty quickly, as you have to background things.
This minor issue isn't worth it. Just bumping the sleep to 3600 makes
the raciness problem go away, and everything works in practice. That's
probably good enough for our purposes.
-Peff
prev parent reply other threads:[~2016-11-10 23:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 17:03 [PATCH] t6026-merge-attr: don't fail if sleep exits early Andreas Schwab
2016-11-08 20:05 ` Jeff King
2016-11-09 13:47 ` Johannes Schindelin
2016-11-09 14:36 ` Andreas Schwab
2016-11-09 15:31 ` Jeff King
2016-11-10 8:31 ` [PATCH v2] " Andreas Schwab
2016-11-10 19:20 ` Junio C Hamano
2016-11-10 21:55 ` Johannes Schindelin
2016-11-10 22:30 ` Junio C Hamano
2016-11-10 22:35 ` Jeff King
2016-11-10 22:55 ` Junio C Hamano
2016-11-10 23:03 ` Jeff King [this message]
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=20161110230356.3is53qysegv637hf@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=schwab@suse.de \
/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 NNTP newsgroup(s).