Is there a difference calling daemon(0,0) from within a program, and launching a program to be in ba
- by Tree77
I think the title says it all, however, I'll expand a bit.
Is there a difference between having the following code at the begining of program 'progX'
if(daemon(0, 0) == -1)
{
printf("daemon error: %s", strerror(errno));
}
or running 'progX' via the command: progX & 2/dev/null 1/dev/null 0/dev/null