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:
Ahmet Alp Balkan 2014-11-13 10:40:22 -08:00
parent 2d644f8ab1
commit 91ea04eea7
2 changed files with 24 additions and 0 deletions

12
signal/signal_unix.go Normal file
View 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
View 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)