Thanks to visit codestin.com
Credit goes to github.com

Skip to content

There's no syscall Dup3 in Darwin (macOS) #50

@harlanasimov

Description

@harlanasimov

I tried to using gopjrt package in my example code, there's a error when I build the project.

$ go build

# github.com/gomlx/gopjrt/pjrt
github.com/gomlx/[email protected]/pjrt/dynamiclib.go:282:19: undefined: syscall.Dup3

After searched google for macos syscall dup3, I got this:

The dup3() syscall does not exist on macOS; it is a feature of Linux and other POSIX-compliant systems, not Darwin (macOS). While macOS offers the dup() and dup2() syscalls, you cannot use dup3() directly, and any attempt to do so will result in a compile-time or runtime error on macOS. If you need dup3() functionality, you'll need to implement conditional compilation to use it on Linux-like systems and an alternative on macOS.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions