]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
SIGPIPE doesn't always exist.
authorTim Kientzle <kientzle@gmail.com>
Fri, 10 Apr 2009 21:23:59 +0000 (17:23 -0400)
committerTim Kientzle <kientzle@gmail.com>
Fri, 10 Apr 2009 21:23:59 +0000 (17:23 -0400)
Submitted by: Christian Ehrlicher

SVN-Revision: 947

libarchive/archive_read_support_compression_program.c

index c81779bf61f0a480d8270e5459071fd517ac038b..11ee8054977a8dff3e58ac9936f9f36a5665bcda 100644 (file)
@@ -252,6 +252,7 @@ child_stop(struct archive_read_filter *self, struct program_filter *state)
        }
 
        if (WIFSIGNALED(state->exit_status)) {
+#ifdef SIGPIPE
                /* If the child died because we stopped reading before
                 * it was done, that's okay.  Some archive formats
                 * have padding at the end that we routinely ignore. */
@@ -260,6 +261,7 @@ child_stop(struct archive_read_filter *self, struct program_filter *state)
                 * child until the child has no more to write. */
                if (WTERMSIG(state->exit_status) == SIGPIPE)
                        return (ARCHIVE_OK);
+#endif
                archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC,
                    "Child process exited with signal %d",
                    WTERMSIG(state->exit_status));