diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-11 23:23:59 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-09-11 23:24:49 -0600 |
commit | 7374395eb39700cd71f77be4f218eadb2712d19d (patch) | |
tree | c63ea2915b100d2139b587281e6475e961fc9fee /src/nslcd_systemd | |
parent | a4277467b95287e19f5410bd028d5b7f9e563033 (diff) |
nslcd_systemd: set up the signal handlers earlier
Diffstat (limited to 'src/nslcd_systemd')
-rw-r--r-- | src/nslcd_systemd/nslcd_systemd.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nslcd_systemd/nslcd_systemd.go b/src/nslcd_systemd/nslcd_systemd.go index ad92f52..6fb29a9 100644 --- a/src/nslcd_systemd/nslcd_systemd.go +++ b/src/nslcd_systemd/nslcd_systemd.go @@ -72,6 +72,9 @@ func Main(backend Backend) uint8 { } }() + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGTERM, syscall.SIGHUP) + disable_nss_module() err = backend.Init() @@ -88,10 +91,6 @@ func Main(backend Backend) uint8 { sd.Notify(false, "STOPPING=1") return lsb.EXIT_NOTRUNNING } - - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGTERM, syscall.SIGHUP) - sock := make(chan *net.UnixConn, 1) go func() { defer lsb.Recover() |