os: implement process related functions

This commit implements various process related functions like
os.Getuid() and os.Getpid(). It also implements or improves this support
in the syscall package if it isn't available yet.
This commit is contained in:
Ayke van Laethem
2021-06-25 15:06:17 +02:00
committed by Ron Evans
parent e65592599c
commit 75298bb84b
8 changed files with 99 additions and 15 deletions
-4
View File
@@ -62,10 +62,6 @@ func Kill(pid int, sig Signal) (err error) {
return ENOSYS // TODO
}
func Getpid() (pid int) {
panic("unimplemented: getpid") // TODO
}
func Getenv(key string) (value string, found bool) {
data := append([]byte(key), 0)
raw := libc_getenv(&data[0])