login_tty man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

LOGIN_TTY(3)		 BSD Library Functions Manual		  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)

BSD			       December 29, 1996			   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net