GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LOGIN_TTY(3) FreeBSD Library Functions Manual LOGIN_TTY(3)

login_tty
prepare a tty for a new login session

System Utilities Library (libutil, -lutil)

#include <libutil.h>

int
login_tty(int fd);

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 terminal 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.

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

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

The function login_tty() first appeared in 4.4BSD.

May 10, 2020 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.