github.com/criyle/go-sandbox@v0.10.3/pkg/forkexec/syscall_darwin.go (about) 1 package forkexec 2 3 import ( 4 "syscall" 5 _ "unsafe" // use go:linkname 6 ) 7 8 //go:linkname syscall3 syscall.syscall 9 func syscall3(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 10 11 //go:linkname rawSyscall syscall.rawSyscall 12 func rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 14 //go:linkname rawSyscall6 syscall.rawSyscall6 15 func rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 17 var libc_fork_trampoline_addr uintptr 18 19 var libc_close_trampoline_addr uintptr 20 21 var libc_read_trampoline_addr uintptr 22 23 var libc_write_trampoline_addr uintptr 24 25 var libc_fcntl_trampoline_addr uintptr 26 27 var libc_dup2_trampoline_addr uintptr 28 29 var libc_chdir_trampoline_addr uintptr 30 31 var libc_setrlimit_trampoline_addr uintptr 32 33 var libc_execve_trampoline_addr uintptr 34 35 var libc_exit_trampoline_addr uintptr 36 37 var libc_setpgid_trampoline_addr uintptr 38 39 //go:linkname fcntl syscall.fcntl 40 func fcntl(fd int, cmd int, arg int) (val int, err error)