I was reading some papers regarding how forking work in linux and why is it needed to call fork to create daemon and why the parent should exit so the init can take control of newly created process and send it to background But this all is in case of if i start daemon from terminal manually so TTY is attached .
How about when i add it to startup and by default init start the daemon and controls it so no TTY is attached
In that case i am little confused as how it is handled
Little light on this would be helpful
Regards