IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.
 


login_tty(3)

NAME

     login_tty -- prepare a tty for a new login session


LIBRARY

     System Utilities Library (libutil, -lutil)


SYNOPSIS

     #include <libutil.h>

     int
     login_tty(int fd);


DESCRIPTION

     The function login_tty() prepares a terminal for a new login session.
     The file descriptor fd passed to login_tty() must be opened for reading
     and writing on a terminal device.	It will be made the controlling termi-
     nal for the calling process, after allocating a new session with
     setsid(2).  This terminal device will also be made the standard input,
     standard output, and standard error output of the calling process.


RETURN VALUES

     The login_tty() function returns -1 if it could not make the device ref-
     erenced by fd the controlling terminal of the calling process, and 0 oth-
     erwise.


SEE ALSO

     dup2(2), ioctl(2), setsid(2), tty(4)

FreeBSD 5.4		       December 29, 1996		   FreeBSD 5.4

SPONSORED LINKS




Man(1) output converted with man2html , sed , awk