go.sys/unix: delete Fork and Exec etc.

These are being deleted from go.sys because in general they can
only be implemented in close coordination with the runtime.

LGTM=dave
R=rsc, dave, josharian
CC=golang-codereviews
https://golang.org/cl/129500043
This commit is contained in:
Rob Pike
2014-08-21 16:14:51 -07:00
parent 9782d98bb0
commit 866b9d8a48
5 changed files with 16 additions and 1005 deletions
+16
View File
@@ -255,3 +255,19 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
}
var ioSync int64
func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
func SetNonblock(fd int, nonblocking bool) (err error) {
flag, err := fcntl(fd, F_GETFL, 0)
if err != nil {
return err
}
if nonblocking {
flag |= O_NONBLOCK
} else {
flag &= ^O_NONBLOCK
}
_, err = fcntl(fd, F_SETFL, flag)
return err
}