mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-12 16:44:43 +00:00
Fix for OS X USR1 signal
It seems that signals code for Linux and OS X (FreeBSD) are different. I rely on `syscall.SIGUSR1` which should be cross-compatible. Tested with `kill -usr1 <pid>` on OS X 10.10
This commit is contained in:
parent
fb71ea0fae
commit
6cd8258651
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ func init() {
|
|||
log.Printf("setting up os signal watcher\n")
|
||||
|
||||
signals = make(chan os.Signal, 1)
|
||||
signal.Notify(signals, syscall.Signal(0xa))
|
||||
signal.Notify(signals, syscall.SIGUSR1)
|
||||
|
||||
go watchForSignals()
|
||||
|
||||
|
@ -258,7 +258,7 @@ func watchForSignals() {
|
|||
|
||||
for {
|
||||
sig := <-signals
|
||||
if sig == syscall.Signal(0xa) {
|
||||
if sig == syscall.SIGUSR1 {
|
||||
log.Println("caught USR1 signal")
|
||||
|
||||
reloadHooks()
|
||||
|
|
Loading…
Add table
Reference in a new issue