diff options
Diffstat (limited to 'linux.go')
| -rw-r--r-- | linux.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/linux.go b/linux.go new file mode 100644 index 0000000..e54e2fa --- /dev/null +++ b/linux.go @@ -0,0 +1,31 @@ +// +build linux,go1.7 + +// put stuff in here that you only want compiled under linux + +package shell + +import "log" +import "os" +import "os/signal" +import "syscall" + +// import "runtime" +// import "time" +// import "reflect" + +// import "git.wit.com/wit/shell" +// import "github.com/davecgh/go-spew/spew" + +import "github.com/wercker/journalhook" + +var sigChan chan os.Signal + +func handleSignal(err interface{}, ret int) { + log.Println("handleSignal() only should be compiled on linux") + sigChan = make(chan os.Signal, 3) + signal.Notify(sigChan, syscall.SIGUSR1) +} + +func UseJournalctl() { + journalhook.Enable() +} |
