OutputFile to /dev/fd?

Helge Blischke h.blischke at srz.de
Mon Dec 3 04:33:08 PST 2007


Stephane Russell wrote:
> Hello,
> 
> I installed cups with foomatic+gs to print on a HP LAserJet 5L. The printing freeze with no errors. A "ps" shows that gs is trying to print to /dev/fd/X:
> 
> ---
> USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
> root      6404  0.0  0.7  4128 3540  ??  SLs   1:34AM   0:14.20 /usr/pkg/sbin/cupsd
> lp        6737  0.0  1.1  6032 5648  ??  IL    1:49AM   0:00.20 /usr/pkg/bin/perl /usr/pkg/libexec/cups/filter/foomatic-rip 18 srussell Test Page 1 job-uuid
> lp        6738  0.0  0.4  3332 1884  ??  IL    1:49AM   0:00.00 parallel:/dev/lpt0 18 srussell Test Page 1 job-uuid=urn:uuid:a3548084-8084-37b3-4695-ace0e7f
> lp        6739  0.0  1.1  6028 5644  ??  IL    1:49AM   0:00.00 /usr/pkg/bin/perl /usr/pkg/libexec/cups/filter/foomatic-rip 18 srussell Test Page 1 job-uuid
> lp        6740  0.0  1.1  6052 5664  ??  IL    1:49AM   0:00.00 /usr/pkg/bin/perl /usr/pkg/libexec/cups/filter/foomatic-rip 18 srussell Test Page 1 job-uuid
> lp        6741  0.0  0.1   784  532  ??  IL    1:49AM   0:00.01 sh -c foomatic-gswrapper -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=-
> lp        6742  0.0  0.1   784  532  ??  IL    1:49AM   0:00.02 sh -c gs '-dBATCH' '-dPARANOIDSAFER' '-dNOPAUSE' '-sDEVICE=ljet4' '-sOutputFile=/dev/fd/3' '
> lp        6743  0.0  0.4  2628 2184  ??  IL    1:49AM   0:00.01 perl -p -0033 -e  s/^&l\\d+[aA]/$&/;
> lp        6744  0.0  2.4 16496 12504  ??  IL    1:49AM   0:00.34 gs -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=/dev/fd/3 /dev/fd/0
> ---
> 
> Does anyone have this problem too? Why is it trying to print in a "fd" device?
> 
> Thanks
> 
> SR
> 

The "fd" stands for "file descriptor". /dev/fd/0 is the same as standard input etc.
The /dev/fd/x trick foomatic-rip uses here is to let Ghostscript do its
output (the device code) to stdout but spit error messages out to stderr.

It may be that the gs version that is installed on your box pretends to
support this but actually does not (as some esp-gs 7.xy).

Helge

-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list