how do I make a process release its terminal?
m5d at bobkat.UUCP
m5d at bobkat.UUCP
Tue Jan 27 01:41:28 AEST 1987
In article <453 at vixie.UUCP> paul at vixie.UUCP (Paul Vixie Esq) writes:
>I have a program that forks itself and exits upon running -- its child
>process runs as a daemon forever after. In 'ps aux', I notice that it
>still shows my tty as its control terminal -- even if I log out and
>back in.
>
>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?
>
>This is (more or less) BSD 4.2, and the program is setuid root. Thanks...
>--
>Paul A. Vixie {ptsfa, qantel, crash, winfree}!vixie!paul
>329 Noe Street dual!ptsfa!vixie!paul at ucbvax.Berkeley.EDU
>San Francisco nike!ptsfa!vixie!paul at seismo.CSS.GOV
>CA 94116 paul at vixie.UUCP (415) 864-7013
My guess is that the other daemons you mentioned are started in the
"rc" command file. I think that "init" runs this with no standard file
descriptors, or maybe with /dev/null. So far as I know, you can't get
rid of the control terminal. You might try fiddling with the process
group, although the shell will grab the tty back anyway.
All this makes me wonder. I don't have source; all the stuff I know
I've figured out through conjecture and the documentation. If I ask a
question, and somebody who has source looks up the answer and posts it,
will the Unix police come and gun us all down?
--
**** ****
**** At Digital Lynx, we're almost in Garland, but not quite ****
**** ****
Mike McNally Digital Lynx Inc.
Software (not hardware) Person Dallas TX 75243
uucp: {texsun,killer,infotel}!pollux!bobkat!m5d (214) 238-7474
More information about the Comp.unix.wizards
mailing list