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
+4
View File
@@ -292,6 +292,10 @@ func Lstat(path string, p *Stat_t) (err error) {
return
}
func Pipe2(p []int, flags int) (err error) {
return ENOSYS // TODO
}
// int stat(const char *path, struct stat * buf);
//export stat
func libc_stat(pathname *byte, ptr unsafe.Pointer) int32