Skip to content

Commit

Permalink
fix SIGUSR1 signal incompatible windows bug.
Browse files Browse the repository at this point in the history
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: fvbock/endless#30
  • Loading branch information
r0ckysec committed Mar 8, 2022
1 parent 6e63be7 commit 1a70eff
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/syscall/types_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a70eff

Please sign in to comment.