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

Fix ptsname macOS implementation #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slonopotamus
Copy link

@slonopotamus slonopotamus commented Jul 22, 2023

See #79


Note that this does NOT fully fix #79 because there is one more issue with master.getCurrent. For some reason, TIOCGETA ioctl returns ENOTTY. So, while it no longer crashes, it doesn't work properly.

See containerd#79

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
@aymanbagabas
Copy link

Note that this does NOT fully fix #79 because there is one more issue with master.getCurrent. For some reason, TIOCGETA ioctl returns ENOTTY. So, while it no longer crashes, it doesn't work properly.

TIOCGETA should be called on the TTY slave not the PTY master. master.getCurrent always uses the PTY master to get the current termios

@slonopotamus
Copy link
Author

So, do you want to say that this library is fully broken? master doesn't have a pointer to slave fd, so almost all its methods that use tcget/tcset are not functional under macOS (and, possibly, FreeBSD)?

@aymanbagabas
Copy link

So, do you want to say that this library is fully broken? master doesn't have a pointer to slave fd, so almost all its methods that use tcget/tcset are not functional under macOS (and, possibly, FreeBSD)?

Of course not 😄 this library is actually pretty awesome and I use it every day!

It's just that I tested it with the slave fd and the tests passed just fine. So maybe it's a Darwin thing?

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

Successfully merging this pull request may close these issues.

console.NewPty panics on macOS
2 participants