git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mike Ralphson" <mike.ralphson@gmail.com>
To: "Paolo Bonzini" <bonzini@gnu.org>, "Junio C Hamano" <gitster@pobox.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Git mailing list" <git@vger.kernel.org>
Subject: Re: [PATCH v2] rollback lock files on more signals than just SIGINT
Date: Wed, 4 Jun 2008 12:40:37 +0100	[thread overview]
Message-ID: <e2b179460806040440m29f2326ek3757660646686623@mail.gmail.com> (raw)
In-Reply-To: <E1K1jnV-0007HC-Om@fencepost.gnu.org>

2008/5/29 Paolo Bonzini <bonzini@gnu.org>:
>
> Other signals are also common, for example SIGTERM and SIGHUP.
> This patch modifies the lock file mechanism to catch more signals.
> It also modifies http-push.c which was missing SIGTERM.
>
> diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
> index 3531a99..46ec1ce 100755
> --- a/t/t7502-commit.sh
> +++ b/t/t7502-commit.sh
> @@ -212,4 +212,18 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
>        test "`cat .git/result`" = "editor not started"
>  '
>
> +pwd=`pwd`
> +cat > .git/FAKE_EDITOR << EOF
> +#! /bin/sh
> +# kill -TERM command added below.
> +EOF
> +
> +test_expect_success 'a SIGTERM should break locks' '
> +       echo >>negative &&
> +       sh -c '\''
> +         echo kill -TERM $$ >> .git/FAKE_EDITOR
> +         GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1  # should fail
> +       ! test -f .git/index.lock
> +'
> +
>  test_done

This addition to the testsuite breaks it on AIX with the default sh
(ksh). Replacing the explicit sh -c with $SHELL_PATH -c fixes it for
me (as I have SHELL_PATH pointing to bash). If that's acceptable I can
post a patch if necessary.

Happy to test any other suggested fixes.

Mike

  reply	other threads:[~2008-06-04 11:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29  8:03 [PATCH] rollback index if git-commit is interrupted by a signal Paolo Bonzini
2008-05-29 12:42 ` Johannes Schindelin
2008-05-29 13:19   ` Paolo Bonzini
2008-05-29 14:03     ` Johannes Schindelin
2008-05-29 14:35       ` Paolo Bonzini
2008-05-29 14:42         ` Johannes Schindelin
2008-05-29 14:55           ` [PATCH v2] rollback lock files on more signals than just SIGINT Paolo Bonzini
2008-06-04 11:40             ` Mike Ralphson [this message]
2008-06-04 17:29               ` Junio C Hamano
2008-06-05  8:02                 ` Mike Ralphson

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=e2b179460806040440m29f2326ek3757660646686623@mail.gmail.com \
    --to=mike.ralphson@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 NNTP newsgroup(s).