[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Forcing a process to have a new controlling terminal



Yes. Bravo. I graciously defer to this more modern method.

Miquel van Smoorenburg wrote:

> In article <3523F75F.940D511@bdsinc.com>,
> Jens B. Jorgensen <jjorgens@bdsinc.com> wrote:
> >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.
>
> Argh, that's the old BSD way of doing things... this will work better:
>
> close(0);
> close(1);
> close(2);
> setsid();
>
> ..... open new tty here ...
>
> Mike.
> --
>  Miquel van Smoorenburg | Our vision is to speed up time,
>     miquels@cistron.nl  |   eventually eliminating it.
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



--
Jens B. Jorgensen
jjorgens@bdsinc.com



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: