diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-05 02:45:17 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-05 02:45:17 +0000 |
commit | 92ff4cdf8c84e91584dd6076aa5b3c774ab0a622 (patch) | |
tree | 6ba01d84d85f00b380477077d920c341c3570b09 /hplip-hpcups-sigpipe.patch | |
parent | d8ce4006ffe8011c16c265205aa330c52a0de0c1 (diff) |
automatic import of hplipopeneuler24.03_LTS
Diffstat (limited to 'hplip-hpcups-sigpipe.patch')
-rw-r--r-- | hplip-hpcups-sigpipe.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/hplip-hpcups-sigpipe.patch b/hplip-hpcups-sigpipe.patch new file mode 100644 index 0000000..3dbe0b0 --- /dev/null +++ b/hplip-hpcups-sigpipe.patch @@ -0,0 +1,29 @@ +diff -up hplip-3.9.8/prnt/hpijs/services.cpp.hpcups-sigpipe hplip-3.9.8/prnt/hpijs/services.cpp +--- hplip-3.9.8/prnt/hpijs/services.cpp.hpcups-sigpipe 2009-08-04 22:35:41.000000000 +0100 ++++ hplip-3.9.8/prnt/hpijs/services.cpp 2009-10-29 11:56:23.015022337 +0000 +@@ -29,6 +29,7 @@ + POSSIBILITY OF SUCH DAMAGE. + \*****************************************************************************/ + ++#include <errno.h> + #include <sys/stat.h> + #include <stdio.h> + #include <stdlib.h> +@@ -382,8 +383,16 @@ DRIVER_ERROR UXServices::ToDevice(const + if (write(OutputPath, pBuffer, *Count) != (ssize_t)*Count) + { + static int cnt=0; +- if (cnt++ < 5) ++ if (cnt < 5) ++ { ++ cnt++; + BUG("unable to write to output, fd=%d, count=%d: %m\n", OutputPath, *Count); ++ } ++ ++ if (errno == EPIPE) ++ /* The backend has exited. There's no recovering from that. */ ++ exit (1); ++ + return IO_ERROR; + } + |