Manish Regmi wrote:
It seems that you (or probably POSIX docs) are confusing two
different things: background process and a deamon. A deamon doesn't
have it's own controolling terminal so it must not read/write from/to
stdio. Perhaps this is what POSIX docs are refering to. Bye.
But,
There can also be a background user program. What happens on that case.
eg,
int main()
{
scanf(...);
}
and i run it as ./my &
See drivers/char/tty_io.c, e.g. tty_check_change function
Search for kill_pg and/or SIGTTOU and/or SIGTTIN.
~velco
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/