-
Notifications
You must be signed in to change notification settings - Fork 18k
os/exec: unable to change terminal control capabilities with Setctty/Setsid #5079
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
Labels
Milestone
Comments
Comment 2 by charmes.guillaume: I tried with os.Std* but still have the same thing. http://play.golang.org/p/LK0Xyx857L |
From the tty_ioctl manpage on Linux: TIOCSCTTY int arg Make the given terminal the controlling terminal of the calling process. The calling process must be a session leader and not have a controlling terminal already. If this terminal is already the controlling terminal of a different session group then the ioctl fails with EPERM, unless the caller is root (more precisely: has the CAP_SYS_ADMIN capability) and arg equals 1, in which case the terminal is stolen, and all processes that had it as controlling terminal lose it. It seems to me EPERM may be correct here. What are you trying to do? What does it look like in C when it's working right? |
Comment 7 by charmes.guillaume: I haven't been able to make it work directly, but it works fine with https://github.com/kr/pty. I guess we can close this issue. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by charmes.guillaume:
The text was updated successfully, but these errors were encountered: