mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Minor improvements to logger SIGHUP test (#1459)
These should provide a slight reliability improvement for this test.
This commit is contained in:
parent
be34ecc557
commit
3ef2876aab
1 changed files with 2 additions and 1 deletions
|
|
@ -26,8 +26,9 @@ func TestRotateLoggerSIGHUP(t *testing.T) {
|
|||
// write a log line
|
||||
logFile.Write([]byte("msg1"))
|
||||
|
||||
sig := make(chan os.Signal)
|
||||
sig := make(chan os.Signal, 1)
|
||||
signal.Notify(sig, syscall.SIGHUP)
|
||||
defer signal.Reset(syscall.SIGHUP)
|
||||
|
||||
// send SIGHUP to the process
|
||||
err = syscall.Kill(syscall.Getpid(), syscall.SIGHUP)
|
||||
|
|
|
|||
Loading…
Reference in a new issue