Subject: access(2) error returns: ETXTBSY vs. read-only
To: None <email@example.com>
From: Ignatios Souvatzis <firstname.lastname@example.org>
Date: 06/16/1999 17:25:35
the access(2) syscall always returns ETXTBSY if a file is executed, even
if it is read-only.
This prevents me from fixing PR 4134 (see there).
As far as I can tell, this is caused by these lines in
1543 if ((flags & VWRITE) == 0 || (error = vn_writechk(vp)) == 0)
1544 error = VOP_ACCESS(vp, flags, cred, p);
Therefore, I'm wondering if reversing the tests like this:
1543 if ((flags & VWRITE) == 0 ||
1544 (error = VOP_ACCESS(vp, flags, cred, p)) == 0)
1545 error = vn_writechk(vp);
would break anything?
* Progress (n.): The process through which Usenet has evolved from
smart people in front of dumb terminals to dumb people in front of
smart terminals. -- email@example.com (obscurity)