pty: set XDG_VTNR if requested by caller
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 12 Jun 2013 13:50:03 +0000 (15:50 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 12 Jun 2013 13:50:03 +0000 (15:50 +0200)
commit35eb595863af94a9b89cf00fecec21490fe0ffd7
treedfb0fbba02b3c17ecba005428b72b9e5e214154b
parent066cf5144595638b8e70b97add195c7e648ecca3
pty: set XDG_VTNR if requested by caller

A caller can now pass a VT-num to the PTY which will get set as XDG_VTNR
in the environment of new childs.

This can be used to tell systemd-logind to associate the session with
the correct VT. But note that this still cannot overwrite VT-associations
if the pty is created from within an existing session.

Reported-by: Thomas Hebb
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/pty.c
src/pty.h