diff options
author | Ayke van Laethem <[email protected]> | 2021-06-25 15:06:17 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-06-25 16:14:47 +0200 |
commit | 75298bb84bcb966998ca00f3cc5506a9757a5038 (patch) | |
tree | 2ec813d6a6f9d88a59821f992f6b4ecb80c19422 /testdata/stdlib.go | |
parent | e65592599cb6c3a0ffd73d5a021b9aa4e00959ae (diff) | |
download | tinygo-75298bb84bcb966998ca00f3cc5506a9757a5038.tar.gz tinygo-75298bb84bcb966998ca00f3cc5506a9757a5038.zip |
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.
Diffstat (limited to 'testdata/stdlib.go')
-rw-r--r-- | testdata/stdlib.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testdata/stdlib.go b/testdata/stdlib.go index e6d6677b6..55237ff68 100644 --- a/testdata/stdlib.go +++ b/testdata/stdlib.go @@ -5,6 +5,7 @@ import ( "math/rand" "os" "strings" + "syscall" ) func main() { @@ -13,6 +14,14 @@ func main() { fmt.Println("stdout:", os.Stdout.Name()) fmt.Println("stderr:", os.Stderr.Name()) + // Package syscall, this mostly checks whether the calls don't trigger an error. + syscall.Getuid() + syscall.Geteuid() + syscall.Getgid() + syscall.Getegid() + syscall.Getpid() + syscall.Getppid() + // package math/rand fmt.Println("pseudorandom number:", rand.Int31()) |