First open /dev/tty. Then do an TIOCNOTTY ioctl on the file. This will make it 
so your
process no longer has a controling terminal. Then simply open a terminal-type 
device. It
will become your controlling terminal (unless you specify otherwise, note the 
flag to
open(2):

       O_NOCTTY
              If pathname refers to  a  terminal  device  --  see
              tty(4) -- it will not become the process's controlĀ­
              ling terminal even if the  process  does  not  have
              one.


Harmon Sequoya Nine wrote:

> Hello.  I'm experimenting with pseudo-terminals, and I cannot find out how, 
> after
> getting a pseudo-terminal how I can make it the controlling terminal (i.e. 
> "/dev/tty")
> of a newly-spawned process.
>
> Can anyone help me out?
>
> TIA
>
> -- Harmon
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



--
Jens B. Jorgensen
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to