Comment 4 for bug 295846

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

In the patch, there is:

+ r = access(fn, c_how);
+ if (r == 0)
+ return true_object;
+ else if (errno == EACCES || errno == EROFS)
+ return false_object;
+ else
+ return ik_errno_to_code();
+}

Is there a reason why ETXTBSY is not included in the middle check.
My manpage says:

     [EROFS] Write access is requested for a file on a read-only
                        file system.

     [ETXTBSY] Write access is requested for a pure procedure (shared
                        text) file presently being executed.

     [EACCES] Permission bits of the file mode do not permit the
                        requested access, or search permission is denied on a
                        component of the path prefix. The owner of a file has
                        permission checked with respect to the ``owner'' read,
                        write, and execute mode bits, members of the file's
                        group other than the owner have permission checked
                        with respect to the ``group'' mode bits, and all oth-
                        ers have permissions checked with respect to the
                        ``other'' mode bits.