Subject: Re: /dev/stdout wierdness
To: Charles M. Hannum <root@ihack.net>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-userlevel
Date: 03/01/2001 13:05:35
On Thu, 1 Mar 2001, Charles M. Hannum wrote:

> 
> > Yeah, this means vn_open() needs to be changed too :)
> 
> The real problem here looks to me like: even though fdesc uses its own
> shadow vnodes, it forwards getattr and setattr requests on to the
> underlying vnode.  If we simply removed that garbage, the setattr would
> fail in ~the same way it does in the non-fdesc case, and this problem
> would go away.

I agree that the setattr forwarding is the problem, and it is where the
fix should be.

I do though think there might be times when it makes sense to forward the
setattr call on, since if I open a file r/w, and then open that file
descriptor via fdevfs, I should be able to do the same things to each
file descriptor (like truncate, etc).

> I could almost -- ALMOST -- see a reason to swap the O_TRUNC and
> VOP_OPEN() parts of vn_open(), but this sort of subtle semantic change
> scares the Hell out of me.

I think we're in violent agreement on this point. :-)

Take care,

Bill