hare

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

commit 9543f477330e07de1b50bc6eb0e3bed97f748246
parent 2b442f74442f969930e2ce424287c45745b67a46
Author: Egor <egor@opensrc.club>
Date:   Tue, 10 May 2022 20:03:55 +0300

fix dup without CLOEXEC in linux dirfs_clone

Signed-off-by: Egor <egor@opensrc.club>

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

diff --git a/os/+linux/dirfdfs.ha b/os/+linux/dirfdfs.ha @@ -98,7 +98,7 @@ export fn dirfs_clone(fs: *fs::fs, resolve: resolve_flags...) *fs::fs = { for (let i = 0z; i < len(resolve); i += 1) { new.resolve |= resolve[i]; }; - new.dirfd = rt::dup(new.dirfd) as int; + new.dirfd = rt::fcntl(new.dirfd, rt::F_DUPFD_CLOEXEC, 0) as int; return &new.fs; };