Skip to content
  • Stefan Agner's avatar
    weston-launch: get ttynr also when no user is given · 77e3b056
    Stefan Agner authored
    In case an user is given but no tty, the code opens tty0 to allocate a
    new tty. With that ttynr is known.
    
    In case a tty name is given the user must be given too. In this case
    we later recover the ttynr by using stat on the file tty file descriptor
    which allows as to find the ttynr by looking at the devices minor number.
    
    However, the third case, when no user and no tty name is given, we do
    not get the ttynr.
    
    This hasn't been a problem in practise since ttynr has not been used.
    However, it makes sense to get the ttynr always for consistency. Also
    upcomming fixes will start to make use of ttynr.
    
    Fixes: 636156d5
    
     ("weston-launch: Don't start new session unless -u is given")
    Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
    77e3b056