Linux Standard Base Core Specification, Generic Part | ||
---|---|---|
<<< Previous | Next >>> |
The login() function shall update the user accounting databases. The ut parameter shall reference a utmp structure for all fields except the following:
The ut_type
field shall be set to USER_PROCESS
.
The ut_pid
field shall be set to the process identifier
for the current process.
The ut_line
field shall be set to the name of the
controlling terminal device.
The name shall be found by examining the device associated with the
standard input, output and error streams in sequence, until one associated with
a terminal device is found.
If none of these streams refers to a terminal device, the
ut_line
field shall be set to "???"
.
If the terminal device is in the /dev directory
hierarchy, the ut_line
field shall not contain the leading
"/dev/"
, otherwise it shall be set to the final component
of the pathname of the device.
If the user
accounting database imposes a limit on the size of the
ut_line
field, it shall
truncate the name, but any such limit shall not be smaller than
UT_LINESIZE
(including a terminating null character).
<<< Previous | Home | Next >>> |
forkpty | Up | login_tty |