提交 f13bfc1b 编写于 作者: M Markus Heidelberg 提交者: Junio C Hamano

contrib/difftool: change trap condition from SIGINT to INT

git-difftool worked for me on an up-to-date Gentoo Linux at home, but
didn't work on a somewhat older Ubuntu Linux 7.10 at work and failed
with the following error, where 'Makefile' was locally modified:

    trap: 244: SIGINT: bad trap
    external diff died, stopping at Makefile.

In 'man 1p trap' there is written:

    "The condition can be EXIT, 0 (equivalent to EXIT), or a signal
    specified using a symbolic name, without the SIG prefix, [...]"

    "Implementations may permit names with the SIG prefix or ignore case
    in signal names as an extension."

So now we do it the POSIX compliant way instead of using an extension.
Signed-off-by: NMarkus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 c5ee71fd
......@@ -53,7 +53,7 @@ launch_merge_tool () {
# Create and ensure that we clean up $BACKUP
test -f "$MERGED" && cp -- "$MERGED" "$BACKUP"
trap sigint_handler SIGINT
trap sigint_handler INT
# $LOCAL and $REMOTE are temporary files so prompt
# the user with the real $MERGED name before launching $merge_tool.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册