Rust

Implementing ptsname_r on OSX with Rust

I've been working on a project with rust that requires creating a pseudo-terminal and like many others, I've run into a lot of problems with the functions available to get a pair of master/slave fds for my PTY. openpty int openpty(int *amaster, int *aslave, char *name, const struct termios *termp, const struct winsize *winp); This function seems like a good fit at first glance but the documentation contains this disclaimer: Nobody knows how much space should be reserved for name. So, calling openpty() or forkpty() with non-NULL name…

Keep reading