Summary: | Handle /dev/null output device with multi-page eps2write driver | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Tom Callaway <spotrh> |
Component: | PDF Writer | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | hille42, lav, mwrochna, sphinx.pinastri |
Priority: | P4 | ||
Version: | 9.53.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
detect special null output file and do not use multipage logic
Make generic function to check for null device and use it |
Description
Tom Callaway
2020-10-05 17:48:08 UTC
This roposal is reasonable, but the submitted patch is not general enough. A better patch should add a new function to the portability layer, gp_*.c to identify a null device, and use it when needed. All devices that generate multiple output files need special handling of the null device. Created attachment 20417 [details]
Make generic function to check for null device and use it
Okay. I think this patch accomplishes that. I went through and replaced any manual checks for the null device in the code with this function. Wasn't sure if gpmisc.* was the right place for it, so if not, I can adjust. This change has the added feature of making these null device checks more correct across all platforms (not just UNIX/DOS/WIN).
We have discussed this and will not make this change. The only reason there are a few devices that use a "quick and dirty" method to detect the NUL: device (or /dev/null) is for performance testing where we want to measure the processing time of Ghostscript including rendering the page, but do not want to include the time of system calls to write the data. It is not clear what use Asymptote would make of running Ghostscript to only throw away the output -- all it would do is slow things down. Better for all to just skip that step and save the processing power for useful work. |