From 5e0b7b849fcaf8e3c6bedc476962fb8392e07cfa Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 21 May 2008 06:01:08 -0400 Subject: [PATCH] Ensure that siginfo_init is called in all tar modes. SVN-Revision: 83 --- tar/write.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tar/write.c b/tar/write.c index 2bcf2514c..4d6dca6ad 100644 --- a/tar/write.c +++ b/tar/write.c @@ -247,6 +247,9 @@ tar_mode_r(struct bsdtar *bsdtar) /* Sanity-test some arguments and the file. */ test_for_append(bsdtar); + /* We want to catch SIGINFO and SIGUSR1. */ + siginfo_init(bsdtar); + format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED; bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT, 0666); @@ -345,6 +348,9 @@ tar_mode_u(struct bsdtar *bsdtar) /* Sanity-test some arguments and the file. */ test_for_append(bsdtar); + /* We want to catch SIGINFO and SIGUSR1. */ + siginfo_init(bsdtar); + bsdtar->fd = open(bsdtar->filename, O_RDWR); if (bsdtar->fd < 0) bsdtar_errc(bsdtar, 1, errno, -- 2.47.3