fvbock / endless

Zero downtime restarts for go servers (Drop in replacement for http.ListenAndServe)
MIT License
4.05k stars 342 forks source link

can't this project build in Windows? #35

Open cye1024 opened 8 years ago

cye1024 commented 8 years ago

I add endless to my project. and i build it in windows env. then it show this: error

C3sarRC commented 6 years ago

cye1024++

shekkm commented 6 years ago

any solutions?

TimLiuDream commented 5 years ago

so am i

github.com/fvbock/endless

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

damithadayananda commented 5 years ago

is there solution for windows

ItsFunny commented 5 years ago

any solution for windows ?

kevincobain2000 commented 2 years ago

Solution shared by one of our devs

https://developpaper.com/using-endless-in-windows-undefined-syscall-sigusr1/

Inside: C:\Program Files\Go\src\syscall\types_windows.go

var signals = [...]string{
    //Omit line n here....
    /**Compatible with Windows start*/
    16: "SIGUSR1",
    17: "SIGUSR2",
    18: "SIGTSTP",
    /**Compatible with windows end*/
}
/**Compatible with Windows start*/
func Kill(...interface{}) {
    return;
}
const (
    SIGUSR1 = Signal(0x10)
    SIGUSR2 = Signal(0x11)
    SIGTSTP = Signal(0x12)
)
/**Compatible with windows end*/