console icon indicating copy to clipboard operation
console copied to clipboard

Fix ptsname macOS implementation

Open slonopotamus opened this issue 2 years ago • 3 comments

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.

slonopotamus avatar Jul 22 '23 17:07 slonopotamus

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

aymanbagabas avatar Aug 01 '23 13:08 aymanbagabas

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)?

slonopotamus avatar Aug 01 '23 16:08 slonopotamus

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?

aymanbagabas avatar Aug 01 '23 17:08 aymanbagabas