You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controlling terminal
TIOCSCTTY int arg
Make the given terminal the controlling terminal of the calling process. The calling process must be a session leader and not have a controlling terminal already. For this case, arg should be specified as zero.
If this terminal is already the controlling terminal of a different session group, then the ioctl fails with EPERM, unless the caller has the CAP_SYS_ADMIN capability and arg equals 1, in which case the terminal is
stolen, and all processes that had it as controlling terminal lose it.
TIOCNOTTY void
If the given terminal was the controlling terminal of the calling process, give up this controlling terminal. If the process was session leader, then send SIGHUP and SIGCONT to the foreground process group and all pro‐
cesses in the current session lose their controlling terminal.
Process group and session ID
TIOCGPGRP pid_t *argp
When successful, equivalent to *argp = tcgetpgrp(fd).
Get the process group ID of the foreground process group on this terminal.
TIOCSPGRP const pid_t *argp
Equivalent to tcsetpgrp(fd, *argp).
Set the foreground process group ID of this terminal.
TIOCGSID pid_t *argp
Get the session ID of the given terminal. This will fail with ENOTTY in case the terminal is not a master pseudoterminal and not our controlling terminal. Strange.
tiocsctty(), tiocnotty(), tiocgpgrp(), etc. are missing.
The text was updated successfully, but these errors were encountered:
For example, from
man tty_ioctl
:tiocsctty()
,tiocnotty()
,tiocgpgrp()
, etc. are missing.The text was updated successfully, but these errors were encountered: