how to find the current tty from a daemon?

From: Andrej Hocevar (drejcica_at_volja.net)
Date: 08/06/03


Date: Wed, 06 Aug 2003 17:50:44 GMT

Hello,
I'm trying to find out how I can tell the current tty from a daemon
written in C. ttyname() is useful only for the tty I start it on, but
how should I do it after that? Besides, ttyname() doesn't help if I
close fds 0, 1 and 2.
Any ideas?

Thanks,

    andrej
    

-- 
echo ${girl_name} > /etc/dumpdates


Relevant Pages

  • Re: tty routines?
    ... ttynameupon its stdin file descriptor. ... status information back to that tty device. ... The best I can do is with Tclx. ... P's call to ttyname() still resolve's to S's tty. ...
    (comp.lang.tcl)
  • how to find out the current tty from a daemon?
    ... I'm trying to find out how I can tell the current tty from a daemon ... ttyname() doesn't help if I ... -- echo $> /etc/dumpdates ...
    (comp.os.linux.development.apps)
  • Re: how to find out the current tty from a daemon?
    ... Andrej Hocevar wrote: ... > I'm trying to find out how I can tell the current tty from a daemon ... ttyname() doesn't help if I ...
    (comp.os.linux.development.apps)
  • Re: how to find the current tty?
    ... On Wed, 6 Aug 2003, Andrej Hocevar wrote: ... ttyname() doesn't help if I ... daemons don't have a "current tty". ... Voice: +1 979-1638 ...
    (comp.unix.programmer)
  • Re: how to find the current tty?
    ... Andrej Hocevar wrote: ... >I'm trying to find out how I can tell the current tty from a daemon ... ttyname() doesn't help if I ... A daemon doesn't usually have a current tty, so what are you expecting to ...
    (comp.unix.programmer)