Git development
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Git Mailing List'" <git@vger.kernel.org>
Cc: "'Joachim Schmitz'" <jojo@schmitz-digital.de>
Subject: t5570 trap use in start/stop_git_daemon
Date: Thu, 12 Feb 2015 15:31:12 -0500	[thread overview]
Message-ID: <013601d04702$d7e721e0$87b565a0$@nexbridge.com> (raw)

On the NonStop port, we found that “trap” was causing an issue with test
success for t5570. When start_git_daemon completes, the shell (ksh,bash) on
this platform is sending a signal 0 that is being caught and acted on by the
trap command within the start_git_daemon and stop_git_daemon functions. I am
taking this up with the operating system group, but in any case, it may be
appropriate to include a trap reset at the end of both functions, as below.
I verified this change on SUSE Linux.

diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index bc4b341..543e98a 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -62,6 +62,7 @@ start_git_daemon() {
                test_skip_or_die $GIT_TEST_GIT_DAEMON \
                        "git daemon failed to start"
       fi
+       trap '' EXIT
}

stop_git_daemon() {
@@ -84,4 +85,6 @@ stop_git_daemon() {
        fi
        GIT_DAEMON_PID=
        rm -f git_daemon_output
+
+       trap '' EXIT
}

Cheers,
Randall
-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000)
-- In real life, I talk too much.

             reply	other threads:[~2015-02-12 20:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 20:31 Randall S. Becker [this message]
2015-02-13  7:44 ` t5570 trap use in start/stop_git_daemon Jeff King
2015-02-13  8:03   ` Jeff King
2015-02-13  8:57     ` Joachim Schmitz
2015-02-13 12:27       ` Randall S. Becker

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='013601d04702$d7e721e0$87b565a0$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=jojo@schmitz-digital.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