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 "os"
|
||||||
import "time"
|
import "time"
|
||||||
import "reflect"
|
import "reflect"
|
||||||
import "os/signal"
|
// import "os/signal"
|
||||||
import "syscall"
|
// import "syscall"
|
||||||
import "runtime"
|
// import "runtime"
|
||||||
|
|
||||||
// this is the king of dns libraries
|
// this is the king of dns libraries
|
||||||
import "github.com/miekg/dns"
|
import "github.com/miekg/dns"
|
||||||
|
@ -192,11 +192,13 @@ func init() {
|
||||||
errChan = make(chan interface{}, 3)
|
errChan = make(chan interface{}, 3)
|
||||||
shell.InitCallback(handleShell) // asks for all the shell errors to be sent here
|
shell.InitCallback(handleShell) // asks for all the shell errors to be sent here
|
||||||
|
|
||||||
|
/*
|
||||||
sigChan = make(chan os.Signal, 3)
|
sigChan = make(chan os.Signal, 3)
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
log.Println("loadConfigFile() OS: Windows")
|
log.Println("loadConfigFile() OS: Windows")
|
||||||
signal.Notify(sigChan, syscall.SIGUSR1)
|
signal.Notify(sigChan, syscall.SIGUSR1)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// get's sent the return values and errors from git.wit.com/wit/shell/
|
// get's sent the return values and errors from git.wit.com/wit/shell/
|
||||||
|
|
Loading…
Reference in New Issue