Revision 196634 of sh(1) breaks lp(1)

Jilles Tjoelker jilles at stack.nl
Sat Sep 26 21:31:31 UTC 2009


On Sat, Sep 26, 2009 at 11:51:28AM -0700, Steve Kargl wrote:
> troutmask:sgk[208] cat .cshrc | lp -d pug
> /usr/bin/lpr: cannot access 

> troutmask:sgk[209] uname -a
> FreeBSD troutmask.apl.washington.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r197195M:
> Mon Sep 14 11:11:46 PDT 2009
> kargl at troutmask.apl.washington.edu:/usr/obj/usr/src/sys/SPEW  amd64

The problem seems not because of r196634 of sh(1), but because of
r194171 of lp(1) (see also PR standards/129554). As of that revision,
lp passes an empty filename to lpr if the new -t option is not used.
lpr cannot access that file and prints the error message.

The attached patch should fix the issue, and should also avoid invalid
arguments to lpr if an empty title is given.

I use CUPS and not FreeBSD lpr so I just checked that the lpr command
looks right in sh -x.

-- 
Jilles Tjoelker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lp-notitle.patch
Type: text/x-diff
Size: 593 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090926/6e5c0620/lp-notitle.bin


More information about the freebsd-current mailing list