don't ignore fcntl return for macos

This commit is contained in:
Mitchell Hashimoto
2022-04-26 17:14:26 -07:00
parent 3b2d93373e
commit e462f35727

View File

@ -166,7 +166,7 @@ fn setupFd(src: File.Handle, target: i32) !void {
// CLO_ON_EXEC for this fd.
const flags = try os.fcntl(src, os.F.GETFD, 0);
if (flags & os.FD_CLOEXEC != 0) {
try os.fcntl(src, os.F.SETFD, flags & ~@as(u32, os.FD_CLOEXEC));
_ = try os.fcntl(src, os.F.SETFD, flags & ~@as(u32, os.FD_CLOEXEC));
}
try os.dup2(src, target);