os: Implement Pipe for darwin, add smoke test.

Evidently when you read from pipes in Go, you have to adjust your slice length to reflect the number of bytes read.
Verified upstream behaves the same way.
This commit is contained in:
Dan Kegel
2021-12-31 21:53:20 -08:00
committed by Ron Evans
parent c0d257d682
commit c78df85015
6 changed files with 84 additions and 4 deletions
+3
View File
@@ -180,6 +180,9 @@ type SysProcAttr struct {
func Getgroups() ([]int, error) { return []int{1}, nil }
func Gettimeofday(tv *Timeval) error { return ENOSYS }
func Kill(pid int, signum Signal) error { return ENOSYS }
func Pipe2(p []int, flags int) (err error) {
return ENOSYS // TODO
}
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
return 0, ENOSYS
}