reassigning a control terminal
Guy Harris
guy at sun.uucp
Sun Oct 13 10:05:14 AEST 1985
> Is there any way to reassign the control terminal associated with a
> process that has been forked from a process to which a control ter-
> minal is associated? That is, can I get a forked process to change
> the device associated with /dev/tty? We are running 4.2bsd.
There is an (undocumented, mumble bitch grumble) "ioctl" call that permits a
process which has a control terminal to detach itself from that control
terminal. You open "/dev/tty" (if it fails, there's no control terminal to
detach yourself from) and do a TIOCNOTTY "ioctl" call (it takes no
parameters). The next terminal that process opens will become its control
terminal.
Guy Harris
More information about the Comp.unix.wizards
mailing list