diff options
author | Tomer Elmalem <[email protected]> | 2019-06-08 14:17:16 -0700 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2019-06-12 19:04:34 +0200 |
commit | 3e1c0d90c5de927d5ff5f334379b3734d3912021 (patch) | |
tree | 80a6425ec35cb78fe14e27f85551dc29d99905c9 /src/os/proc.go | |
parent | b7197bcaaebb310b5df8158bd8b516ecad41062a (diff) | |
download | tinygo-3e1c0d90c5de927d5ff5f334379b3734d3912021.tar.gz tinygo-3e1c0d90c5de927d5ff5f334379b3734d3912021.zip |
Add implementation for os.Exit and syscall.Exit
Diffstat (limited to 'src/os/proc.go')
-rw-r--r-- | src/os/proc.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/os/proc.go b/src/os/proc.go new file mode 100644 index 000000000..a7718c436 --- /dev/null +++ b/src/os/proc.go @@ -0,0 +1,17 @@ +// Package os implements a subset of the Go "os" package. See +// https://godoc.org/os for details. +// +// Note that the current implementation is blocking. This limitation should be +// removed in a future version. +package os + +import ( + "syscall" +) + +// Exit causes the current program to exit with the given status code. +// Conventionally, code zero indicates success, non-zero an error. +// The program terminates immediately; deferred functions are not run. +func Exit(code int) { + syscall.Exit(code) +} |