console icon indicating copy to clipboard operation
console copied to clipboard

linux: TIOCGPTPEER support

Open cyphar opened this issue 7 months ago • 0 comments

At the moment the NewPty API is based around the ptsname-style API where you get a pathname in /dev/pts/ that you can open. However, many years ago I added support for getting the peer end of a pty with the TIOCGPTPEER ioctl (allowing you to get the peer end without worrying about the filesystem having a fake /dev/pts).

In principle, you can do this manually today, but it would be nice if this was supported (on Linux at least). #86 adds GetPtyFromFile, maybe GetPtyFiles would be better? (On other operating systems you could just return the non-race-free

cyphar avatar May 19 '25 03:05 cyphar