]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
foomatic-rip: Fix a SIGPIPE error when calling gs (#517)
authorSteve Langasek <steve.langasek@canonical.com>
Fri, 17 Mar 2023 20:02:43 +0000 (13:02 -0700)
committerGitHub <noreply@github.com>
Fri, 17 Mar 2023 20:02:43 +0000 (21:02 +0100)
commit3a4d8b5b236e315fda392f4ae706578bde7a9c19
treee2bd800b4efea22fa077793f07d03c117098d88e
parent64b3da441f36d54318352a0bb41e162f4c72cd3e
foomatic-rip: Fix a SIGPIPE error when calling gs (#517)

https://autopkgtest.ubuntu.com/packages/f/foo2zjs/lunar/ppc64el shows
foo2zjs's testsuite failing with cups-filters 2.0beta3 on ppc64el because
the gs command here to check page count is failing with a SIGPIPE when
trying to write back to the parent.  To fix this, we close gs's input fd as
soon as we know we're done writing to it.  Since gs may not have started
processing its input until this happens, also give the final poll() a longer
timeout (5s instead of 1s); without this we see race conditions because
foomatic-rip gives up before gs has had a chance to finish processing.
filter/foomatic-rip/postscript.c