Extract client signals to pkg/signal
SIGCHLD and SIGWINCH used in api/client (cli code) are not available on Windows. Extracting into separate files with build tags. Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
This commit is contained in:
parent
2d644f8ab1
commit
91ea04eea7
2 changed files with 24 additions and 0 deletions
12
signal/signal_unix.go
Normal file
12
signal/signal_unix.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
// +build !windows
|
||||
|
||||
package signal
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// Signals used in api/client (no windows equivalent, use
|
||||
// invalid signals so they don't get handled)
|
||||
const SIGCHLD = syscall.SIGCHLD
|
||||
const SIGWINCH = syscall.SIGWINCH
|
12
signal/signal_windows.go
Normal file
12
signal/signal_windows.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
// +build windows
|
||||
|
||||
package signal
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// Signals used in api/client (no windows equivalent, use
|
||||
// invalid signals so they don't get handled)
|
||||
const SIGCHLD = syscall.Signal(0xff)
|
||||
const SIGWINCH = syscall.Signal(0xff)
|
Loading…
Reference in a new issue