Subject: Re: printing with acroread7 and cups
To: Eric Haszlakiewicz <>
From: Bill Studenmund <>
List: tech-pkg
Date: 09/01/2005 14:49:32
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 01, 2005 at 04:40:28PM -0500, Eric Haszlakiewicz wrote:
> On Thu, Sep 01, 2005 at 01:21:38PM -0700, Bill Studenmund wrote:
> > On Thu, Sep 01, 2005 at 02:49:29PM -0500, Eric Haszlakiewicz wrote:
> > > 	Try running with the patch at:
> > >
> > > and see if it makes any difference.
> >=20
> > Looking at the right file, I have two questions:
> 	oops.  I guess I should have tried the link instead of
> just typing it from memory. :|
> > 1) what exactly are you trying to do? A comment or two would help.
> 	Erase the emulation root dir from any cwd that has it.  i.e.:
> figure out what the emulation dir (e.g. /emul/linux) actually points to.
>   (on my machine, and most I think, /usr/pkg/emul/linux)
> then see if the path returned from getcwd starts with that
>   (e.g. "/usr/pkg/emul/linux/bin")
> and if so, remove it.
> 	(e.g. turning the path into just "/bin"
> I'll add some comments.

I'm not sure what I think of this. But I'll defer that for other messages.=
I am concerned that we may introduce more problems than we solve.

> > 2) Where do you clean up the vnode returned by namei()?
> 	I thought I needed to do something with it, but I wasn't quite sure what.
> I tried vput() immediately after the namei call, since that's what other =
> paths seem to do, but that panic'd with a releasing unlocked lock error.

You need vrele(). From the comments for lookup() (called by namei()):

 *                                                                    If
 * the target of the pathname exists and LOCKLEAF is or'ed into the flag
 * the target is returned locked, otherwise it is returned unlocked.

So vput() was wrong as the vnode wasn't locked. However you do need to do=
something to release it. vrele(). :-)

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)