Subject: Re: lpd setup
To: Hauke Fath <hf@spg.tu-darmstadt.de>
From: Greg A. Woods <woods@weird.com>
List: port-i386
Date: 12/17/2006 19:33:55
--pgp-sign-Multipart_Sun_Dec_17_19:33:43_2006-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Fri, 15 Dec 2006 11:34:32 +0100,
Hauke Fath wrote:
>=20
> Am 14.12.2006 um 13:54 Uhr -0500 schrieb Greg A. Woods:
> >I did find that with a local printer that didn't use any printer device,
> >e.g. when using appletalk via the netatalk PAP tools, then specifying
> >"lp=3D/dev/null" was the best way to avoid problems with device opening.
>=20
> Back when I set up stuff like that, lpd(8) tried an exclusive open on=20
> the null device file, and you needed to mknod a private null per=20
> printer. Has this changed, and when?

I've never noticed a problem, and I've had "lp=3D/dev/null" in the
main printcap entry on my main file server and development server for
several years now, starting in 1.3 I think it was.

So far as I can see the opentty() routine in lpr/lpd/printjob.c (and
openpr() in much earlier versions) has always just used either O_RDRW or
O_WRONLY when it actually opens the device.  Also so far as I can see
the only file ever locked is the "lo" file, normally "lock" in the "sd"
directory.

The only time I've ever seen exclusive-open issues with printer
configurations on *BSD is when the "lp" device is one which only allows
one process to open it at a time and when something else also tries to
open the same device, e.g. a poorly designed filter, or a getty, etc.

--=20
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>

--pgp-sign-Multipart_Sun_Dec_17_19:33:43_2006-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: 9EJSUSeSX6++ABMDM5IfRwDLZL0XSu/I

iQA/AwUBRYXh82J7XxTCWceFEQIgPgCgzvUB08SqUMkx3SbEtDfjC+6nZWgAoIkC
JKHImqVlaTDQ6Bgn9ozBLnvS
=/JJz
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Sun_Dec_17_19:33:43_2006-1--