1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:57:57 -07:00

fix SIGUSR1 signal incompatible windows bug.

xxx.go:64:3: undefined: syscall.SIGUSR1
xxx.go:65:3: undefined: syscall.SIGUSR2
xxx.go:68:3: undefined: syscall.SIGTSTP
xxx.go:111:5: undefined: syscall.SIGUSR1
xxx.go:112:5: undefined: syscall.SIGUSR2
xxx.go:115:5: undefined: syscall.SIGTSTP
xxx.go:119:5: undefined: syscall.SIGUSR1
xxx.go:120:5: undefined: syscall.SIGUSR2
xxx.go:123:5: undefined: syscall.SIGTSTP
xxx.go:224:3: undefined: syscall.Kill
xxx.go:224:3: too many errors

after fixing, it can be compiled normally

The items in question are: https://github.com/fvbock/endless/issues/30
This commit is contained in:
r0cky 2022-03-08 16:18:50 +08:00 committed by GitHub
parent 6e63be7b69
commit 1a70eff904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,8 +80,24 @@ var signals = [...]string{
13: "broken pipe",
14: "alarm clock",
15: "terminated",
/* compatible with windows */
16: "SIGUSR1",
17: "SIGUSR2",
18: "SIGTSTP",
/* compatible with windows */
}
/* compatible with windows */
func Kill(...interface{}) error {
return nil;
}
const (
SIGUSR1 = Signal(16)
SIGUSR2 = Signal(17)
SIGTSTP = Signal(18)
)
/* compatible with windows */
const (
GENERIC_READ = 0x80000000
GENERIC_WRITE = 0x40000000