all: sync with master; upd chlog
This commit is contained in:
@@ -113,7 +113,7 @@ func (w *osWatcher) handleEvents() {
|
||||
}
|
||||
|
||||
// Skip the following events assuming that sometimes the same event
|
||||
// occurrs several times.
|
||||
// occurs several times.
|
||||
for ok := true; ok; {
|
||||
select {
|
||||
case _, ok = <-ch:
|
||||
|
||||
@@ -182,3 +182,8 @@ func IsReconfigureSignal(sig os.Signal) (ok bool) {
|
||||
func IsShutdownSignal(sig os.Signal) (ok bool) {
|
||||
return isShutdownSignal(sig)
|
||||
}
|
||||
|
||||
// SendShutdownSignal sends the shutdown signal to the channel.
|
||||
func SendShutdownSignal(c chan<- os.Signal) {
|
||||
sendShutdownSignal(c)
|
||||
}
|
||||
|
||||
@@ -37,3 +37,7 @@ func isShutdownSignal(sig os.Signal) (ok bool) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func sendShutdownSignal(_ chan<- os.Signal) {
|
||||
// On Unix we are already notified by the system.
|
||||
}
|
||||
|
||||
@@ -77,3 +77,7 @@ func isShutdownSignal(sig os.Signal) (ok bool) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func sendShutdownSignal(c chan<- os.Signal) {
|
||||
c <- os.Interrupt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user