# # patch "ChangeLog" # from [2c6040edaf0ca83ca5b2ddd9f6ff3e39be3c8bce] # to [8a163634dbcfcf48c0334c2ce3676ed86b40979d] # # patch "unix/process.cc" # from [f29013c6954e3254d58e2fe6681c9cbd723ba45f] # to [19a85f2a6d49d71960b847302b34bd8e99bd56d8] # ======================================================================== --- ChangeLog 2c6040edaf0ca83ca5b2ddd9f6ff3e39be3c8bce +++ ChangeLog 8a163634dbcfcf48c0334c2ce3676ed86b40979d @@ -1,5 +1,11 @@ 2005-08-17 Nathaniel Smith + * unix/process.cc (make_executable): Open the fd read-only, avoids + problems with read-only files, and a writeable fd doesn't seem to + be necessary to change permission bits. + +2005-08-17 Nathaniel Smith + * unix/process.cc (is_executable, make_executable): When reporting an error in a syscall, include the actual error message. ======================================================================== --- unix/process.cc f29013c6954e3254d58e2fe6681c9cbd723ba45f +++ unix/process.cc 19a85f2a6d49d71960b847302b34bd8e99bd56d8 @@ -58,7 +58,7 @@ { mode_t mode; struct stat s; - int fd = open(path, O_RDWR); + int fd = open(path, O_RDONLY); N(fd != -1, F("error opening file %s: %s") % path % strerror(errno)); if (fstat(fd, &s)) return -1;