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


Manual Reference Pages  -  TCSETSID (3)

NAME

tcsetsid - set session ID associated with a controlling terminal

CONTENTS

Library
Synopsis
Description
Errors
See Also
History

LIBRARY


.Lb libc

SYNOPSIS


.In sys/types.h
.In termios.h int tcsetsid int fd pid_t pid

DESCRIPTION

The tcsetsid function sets associates a session identified by pid with a controlling terminal specified by fd.

This implementation only allows the controlling terminal to be changed by the session leader itself. This implies that pid always has to be equal to the process ID.

It is unsupported to associate with a terminal that already has an associated session. Conversely, it is also unsupported to associate to a terminal when the session is already associated with a different terminal.

ERRORS

If an error occurs, tcsetsid returns -1 and the global variable errno is set to indicate the error, as follows:
[EBADF]
  The fd argument is not a valid file descriptor.
[ENOTTY]
  The file descriptor represented by fd is not a terminal.
[EINVAL]
  The pid argument is not equal to the session ID of the calling process.
[EPERM]
  The calling process is not a session leader.
[EPERM]
  The session already has an associated terminal or the terminal already has an associated session.

SEE ALSO

getsid(2), setsid(2), tcgetpgrp(3), tcgetsid(3)

HISTORY

A tcsetsid function first appeared in QNX. It does not comply to any standard.
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 manServer 1.07.