From 5a9bf43f0e5e7904b64c432d67d3226e2a7ddfca Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 3 Sep 2015 13:45:38 -0600 Subject: Use systemd/lsb exit codes, consistently --- src/nshd/hackers_git/hackers_watch.go | 3 ++- src/nshd/main.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/nshd') diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go index a878f4c..3d72f94 100644 --- a/src/nshd/hackers_git/hackers_watch.go +++ b/src/nshd/hackers_git/hackers_watch.go @@ -5,6 +5,7 @@ import ( "os" "path/filepath" "sd_daemon/logger" + "sd_daemon/lsb" ) const ( @@ -128,7 +129,7 @@ func (o *Hackers) worker_handle_passwd(uid int32) { func worker_error(format string, a ...interface{}) { logger.Err(format, a) - os.Exit(255) + os.Exit(int(lsb.EXIT_FAILURE)) } func (o *Hackers) worker() { diff --git a/src/nshd/main.go b/src/nshd/main.go index ac49eaa..ebca1a6 100644 --- a/src/nshd/main.go +++ b/src/nshd/main.go @@ -14,5 +14,5 @@ func main() { backend := hackers_git.NewHackers(config) ret := nslcd_systemd.Main(backend) backend.Close() - os.Exit(ret) + os.Exit(int(ret)) } -- cgit v1.2.3-54-g00ecf