-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux_arm64 platform doesn't have syscall.Dup2 so use the nearly identical syscall.Dup3 instead.
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build !linux !arm64 | ||
// +build !windows | ||
|
||
package daemon | ||
|
||
import ( | ||
"syscall" | ||
) | ||
|
||
func syscallDup(oldfd int, newfd int) (err error) { | ||
return syscall.Dup2(oldfd, newfd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build linux,arm64 | ||
|
||
package daemon | ||
|
||
import "syscall" | ||
|
||
func syscallDup(oldfd int, newfd int) (err error) { | ||
// linux_arm64 platform doesn't have syscall.Dup2 | ||
// so use the nearly identical syscall.Dup3 instead. | ||
return syscall.Dup3(oldfd, newfd, 0) | ||
} |