mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 12:29:03 +00:00
Add implementation for os.Exit and syscall.Exit
This commit is contained in:
committed by
Ayke van Laethem
parent
b7197bcaae
commit
3e1c0d90c5
@@ -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)
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package syscall
|
||||||
|
|
||||||
|
func Exit(code int)
|
||||||
Reference in New Issue
Block a user