lkml.org 
[lkml]   [2016]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Does anyone care about a race free ptsname?
    From
    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

    \
     
     \ /
      Last update: 2016-04-20 02:41    [W:4.849 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site