hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 04655ea7214c48b7e57ac03d96b44edc1ea192b7
parent 595d4ce723a21c348f82ac687d649890fb91f453
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed,  3 Nov 2021 11:54:19 +0100

os::exec: use RDONLY on +freebsd

This is a bit of a doozy. It turns out that the earlier bug is that
O_EXEC interacts poorly with fdescfs. This uses O_RDONLY instead, which
is not perfect, but does "fix" the issue - assuming you mount fdescfs!

We will want to petition FreeBSD to mount fdescfs by default.

Diffstat:
Mos/exec/exec+freebsd.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/exec/exec+freebsd.ha b/os/exec/exec+freebsd.ha @@ -26,7 +26,7 @@ fn open(path: str) (platform_cmd | error) = { return errors::noaccess; }; }; - match (rt::open(path, rt::O_EXEC, 0u)) { + match (rt::open(path, rt::O_RDONLY, 0u)) { case fd: int => return fd; case err: rt::errno =>