Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Go 1.15.0 #77

Closed
feketegy opened this issue Aug 13, 2020 · 3 comments
Closed

Not working with Go 1.15.0 #77

feketegy opened this issue Aug 13, 2020 · 3 comments

Comments

@feketegy
Copy link

feketegy commented Aug 13, 2020

Upgraded Go to 1.15.0 in alpine linux 3.12 and I'm getting this error: "Setctty set but Ctty not valid in child" for a http application.

The command used: reflex -r '.\.go' -R '._test\.go' -d 'none' -s my-binary start

If I downgrade to Go 1.14.7 it works as expected.

As far as I can tell there were some modifications made in the syscall package in Go 1.15.0, specifically from the docs:

On Unix systems, functions that use SysProcAttr will now reject attempts to set both the Setctty and Foreground fields, as they both use the Ctty field but do so in incompatible ways. We expect that few existing programs set both fields.

Setting the Setctty field now requires that the Ctty field be set to a file descriptor number in the child process, as determined by the ProcAttr.Files field. Using a child descriptor always worked, but there were certain cases where using a parent file descriptor also happened to work. Some programs that set Setctty will need to change the value of Ctty to use a child descriptor number.

Source: https://golang.org/doc/go1.15

cespare added a commit that referenced this issue Aug 13, 2020
The old pty package uses Setctty in a wrong way that broke in Go 1.15.

Updates #77.
@cespare
Copy link
Owner

cespare commented Aug 13, 2020

@feketegy thanks for the report. I think that 456b371 should fix it. Would you mind updating to latest master and trying it out?

Unfortunately I didn't seem to be able to reproduce the problem myself with Go 1.15.

@feketegy
Copy link
Author

@cespare it's working, thanks!

@cespare
Copy link
Owner

cespare commented Aug 13, 2020

Glad to hear it. I tagged v0.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants