Messages in this thread | | | Date | Tue, 19 Apr 2016 17:18:26 -0700 | Subject | Re: Does anyone care about a race free ptsname? | From | Linus Torvalds <> |
| |
On Tue, Apr 19, 2016 at 4:39 PM, H. Peter Anvin <hpa@zytor.com> wrote: > > What do you think of the idea of TIOCPTSOPEN (or whatever) to get a file > descriptor for the slave device given the master device? Then we can > use realpath() or a readlink on /proc/self/fd/# to get the pathname if > needed.
That sounds reasonable to me.
> (Incidentally, we added getcwd() as a system call. Should we add > [f]realpath() as a system call too?)
Probably a good idea. It's kind of silly to have to do a sprintf followed by a readlink().
Linus
| |