Don't perform wake up procedure if stopped in less than 60 seconds
This commit is contained in:
parent
9aa0b3fe29
commit
25fbee5a57
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -152,7 +152,7 @@ loop:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tell parent process that it can launch the wake up procedure
|
// Tell parent process that it can launch the wake up procedure
|
||||||
if time.Now().Sub(launched) < MaxRunTime {
|
if time.Since(launched) < MaxRunTime && time.Since(launched) > 60*time.Second {
|
||||||
if proc, err := os.FindProcess(os.Getppid()); err != nil {
|
if proc, err := os.FindProcess(os.Getppid()); err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
} else if err := proc.Signal(syscall.SIGHUP); err != nil {
|
} else if err := proc.Signal(syscall.SIGHUP); err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue