go.sys/plan9: delete Exec etc.

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

LGTM=0intro
R=golang-codereviews, 0intro
CC=golang-codereviews
https://golang.org/cl/132810043
This commit is contained in:
Rob Pike
2014-08-22 15:33:52 -07:00
parent 866b9d8a48
commit fcfc1156f8
2 changed files with 32 additions and 633 deletions
+32
View File
@@ -87,6 +87,38 @@ func copyenv() {
}
}
// readdirnames returns the names of files inside the directory represented by dirfd.
func readdirnames(dirfd int) (names []string, err error) {
names = make([]string, 0, 100)
var buf [STATMAX]byte
for {
n, e := Read(dirfd, buf[:])
if e != nil {
return nil, e
}
if n == 0 {
break
}
for i := 0; i < n; {
m, _ := gbit16(buf[i:])
m += 2
if m < STATFIXLEN {
return nil, ErrBadStat
}
s, _, ok := gstring(buf[i+41:])
if !ok {
return nil, ErrBadStat
}
names = append(names, s)
i += int(m)
}
}
return
}
func Getenv(key string) (value string, found bool) {
if len(key) == 0 {
return "", false