Add implementation for os.Exit and syscall.Exit

Этот коммит содержится в:
Tomer Elmalem 2019-06-08 14:17:16 -07:00 коммит произвёл Ayke van Laethem
родитель b7197bcaae
коммит 3e1c0d90c5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E97FF5335DFDFDED
2 изменённых файлов: 20 добавлений и 0 удалений

17
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)
}

3
src/syscall/syscall.go Обычный файл
Просмотреть файл

@ -0,0 +1,3 @@
package syscall
func Exit(code int)