Back to daemons
To force a process to run in the background just fork() and have the parent exit.
There are a number of ways to disassociate a process from any controlling terminal.
Daemons should close all unnecessary descriptors (often including stdin, stdout, stderr).