parent
fec14f2ef2
commit
a6b312d6a3
|
@ -0,0 +1,21 @@
|
|||
// +build linux,go1.7
|
||||
|
||||
package main
|
||||
|
||||
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"
|
||||
|
||||
func handleLinux(err interface{}, ret int) {
|
||||
sigChan = make(chan os.Signal, 3)
|
||||
log.Println("handleLinux() only should be compiled on linux")
|
||||
signal.Notify(sigChan, syscall.SIGUSR1)
|
||||
}
|
8
main.go
8
main.go
|
@ -4,9 +4,9 @@ import "log"
|
|||
import "os"
|
||||
import "time"
|
||||
import "reflect"
|
||||
import "os/signal"
|
||||
import "syscall"
|
||||
import "runtime"
|
||||
// import "os/signal"
|
||||
// import "syscall"
|
||||
// import "runtime"
|
||||
|
||||
// this is the king of dns libraries
|
||||
import "github.com/miekg/dns"
|
||||
|
@ -192,11 +192,13 @@ func init() {
|
|||
errChan = make(chan interface{}, 3)
|
||||
shell.InitCallback(handleShell) // asks for all the shell errors to be sent here
|
||||
|
||||
/*
|
||||
sigChan = make(chan os.Signal, 3)
|
||||
if runtime.GOOS != "windows" {
|
||||
log.Println("loadConfigFile() OS: Windows")
|
||||
signal.Notify(sigChan, syscall.SIGUSR1)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// get's sent the return values and errors from git.wit.com/wit/shell/
|
||||
|
|
Loading…
Reference in New Issue