--- /dev/null
+diff -urN cups-filters.orig/filter/imagetopdf.c cups-filters/filter/imagetopdf.c
+--- cups-filters.orig/filter/imagetopdf.c 2013-02-05 14:49:33.165014130 +0900
++++ cups-filters/filter/imagetopdf.c 2013-02-05 14:51:33.465014116 +0900
+@@ -40,6 +40,7 @@
+ #include <cupsfilters/image.h>
+ #include <math.h>
+ #include <ctype.h>
++#include <signal.h>
+
+ #if CUPS_VERSION_MAJOR < 1 \
+ || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
+@@ -712,6 +713,19 @@
+
+ setbuf(stderr, NULL);
+
++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
++ struct sigaction action; /* Actions for POSIX signals */
++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
++ #ifdef HAVE_SIGSET
++ sigset(SIGPIPE, SIG_IGN);
++#elif defined(HAVE_SIGACTION)
++ memset(&action, 0, sizeof(action));
++ action.sa_handler = SIG_IGN;
++ sigaction(SIGPIPE, &action, NULL);
++#else
++ signal(SIGPIPE, SIG_IGN);
++#endif /* HAVE_SIGSET */
++
+ /*
+ * Check command-line...
+ */
+diff -urN cups-filters.orig/filter/pdftoijs.cxx cups-filters/filter/pdftoijs.cxx
+--- cups-filters.orig/filter/pdftoijs.cxx 2013-02-05 14:49:33.161014130 +0900
++++ cups-filters/filter/pdftoijs.cxx 2013-02-05 14:52:58.129014106 +0900
+@@ -30,6 +30,7 @@
+ #include <config.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <signal.h>
+ #ifdef HAVE_CPP_POPPLER_VERSION_H
+ #include "cpp/poppler-version.h"
+ #endif
+@@ -294,6 +295,19 @@
+ globalParams = new GlobalParams();
+ parseOpts(argc, argv);
+
++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
++ struct sigaction action; /* Actions for POSIX signals */
++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
++ #ifdef HAVE_SIGSET
++ sigset(SIGPIPE, SIG_IGN);
++#elif defined(HAVE_SIGACTION)
++ memset(&action, 0, sizeof(action));
++ action.sa_handler = SIG_IGN;
++ sigaction(SIGPIPE, &action, NULL);
++#else
++ signal(SIGPIPE, SIG_IGN);
++#endif /* HAVE_SIGSET */
++
+ if (argc == 6) {
+ /* stdin */
+ int fd;
+diff -urN cups-filters.orig/filter/texttopdf.c cups-filters/filter/texttopdf.c
+--- cups-filters.orig/filter/texttopdf.c 2013-02-05 14:49:33.165014130 +0900
++++ cups-filters/filter/texttopdf.c 2013-02-05 14:53:47.893014100 +0900
+@@ -33,6 +33,7 @@
+ #include <assert.h>
+ #include "fontembed/sfnt.h"
+ #include <fontconfig/fontconfig.h>
++#include <signal.h>
+
+ /*
+ * Globals...
+@@ -157,6 +158,18 @@
+ main(int argc, /* I - Number of command-line arguments */
+ char *argv[]) /* I - Command-line arguments */
+ {
++#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
++ struct sigaction action; /* Actions for POSIX signals */
++#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
++ #ifdef HAVE_SIGSET
++ sigset(SIGPIPE, SIG_IGN);
++#elif defined(HAVE_SIGACTION)
++ memset(&action, 0, sizeof(action));
++ action.sa_handler = SIG_IGN;
++ sigaction(SIGPIPE, &action, NULL);
++#else
++ signal(SIGPIPE, SIG_IGN);
++#endif /* HAVE_SIGSET */
+ return (TextMain("texttopdf", argc, argv));
+ }
+