how do I make a process release its terminal?

wsr at lmi-angel.UUCP wsr at lmi-angel.UUCP
Thu Jan 22 03:19:06 AEST 1987


In article <> paul at vixie.UUCP (Paul Vixie Esq) writes:
>I see that syslogd, inetd, cron, and the rest do NOT show 'co' as their
>control terminal; how do I make this happen for me?

try this: 

#include <sys/ioctl.h>

fromlimbo ()
{
    int     f;

    if ((f = open ("/dev/tty", 2)) >= 0)
    {
	ioctl (f, TIOCNOTTY, 0);
	close (f);
    }
    else
	perror ("open");
}
-- 
Wolfgang Rupprecht	{harvard|decvax!cca|mit-eddie}!lmi-angel!wsr



More information about the Comp.unix.wizards mailing list