From 3e1c0d90c5de927d5ff5f334379b3734d3912021 Mon Sep 17 00:00:00 2001 From: Tomer Elmalem Date: Sat, 8 Jun 2019 14:17:16 -0700 Subject: [PATCH] Add implementation for os.Exit and syscall.Exit --- src/os/proc.go | 17 +++++++++++++++++ src/syscall/syscall.go | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 src/os/proc.go create mode 100644 src/syscall/syscall.go 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) +} diff --git a/src/syscall/syscall.go b/src/syscall/syscall.go new file mode 100644 index 000000000..2d789b63e --- /dev/null +++ b/src/syscall/syscall.go @@ -0,0 +1,3 @@ +package syscall + +func Exit(code int)