controlling terminal

What is controlling terminal in the case of daemon process?

A daemon may or may not be associated to a terminal - by association we mean being able to writes its stderr and stdout to the terminal... on unix systems normally long running jobs, routine jobs and many administrative tasks are either daemons themselves or started by daemons... for example when you log on to a unix system thru telnet server on your machine, the telnetd daemon which continuously tiks on the host unix system takes your request and calls the init-getty-login-shell sequence... for example your shell is a daemon that can write its stderr and stdout to the terminal.. if you type a wrong command you can see the shell daemon write an error message...

Hope this helps...

Cheers!
Vishnu.

thanks