mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 09:07:16 -04:00
unix: add Dup3 on netbsd and openbsd
Change-Id: Id871d3d211d6d5896e41b673c7bfe3a1d8e756a6 Reviewed-on: https://go-review.googlesource.com/c/sys/+/212461 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
04cbcbbfee
commit
c96a22e43c
@@ -553,6 +553,16 @@ func Dup2(from int, to int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Dup3(from int, to int, flags int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Exit(code int) {
|
||||
Syscall(SYS_EXIT, uintptr(code), 0, 0)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user