cloudflare / tableflip

Graceful process restarts in Go
BSD 3-Clause "New" or "Revised" License
2.88k stars 147 forks source link

Impossible to build for windows #40

Closed scraly closed 4 years ago

scraly commented 4 years ago

Hi,

In an application I use cloudflare/tableflip lib.

I've got an issue when I try to build for windows/386:


# github.com/cloudflare/tableflip
../../../../go/pkg/mod/github.com/cloudflare/tableflip@v1.0.0/env.go:13:2: cannot use syscall.CloseOnExec (type func(syscall.Handle)) as type func(int) in field value
../../../../go/pkg/mod/github.com/cloudflare/tableflip@v1.0.0/fds.go:344:36: not enough arguments in call to syscall.Syscall
../../../../go/pkg/mod/github.com/cloudflare/tableflip@v1.0.0/fds.go:344:37: undefined: syscall.SYS_FCNTL
../../../../go/pkg/mod/github.com/cloudflare/tableflip@v1.0.0/fds.go:344:60: undefined: syscall.F_DUPFD_CLOEXEC

Thanks

Zenithar commented 4 years ago

Different types between unix and windows syscalls (https://golang.org/src/syscall/exec_unix.go#L103) and (https://golang.org/src/syscall/exec_windows.go#L124)

lmb commented 4 years ago

Hi, tableflip doesn't work on Windows I'm afraid. I've also not tried to port it, so I don't know how much effort it would be.