>>4
then you clearly don't understand the problem addressed in the comment.
Also, do not use _exit(). Use _Exit or exit.
Name:
Anonymous2008-05-19 11:58
>>5
I understand the problem, I need that at PPID of new process /= PID of my process (<=> new parent process = init). I don't know if exist better solution...
And the function _Exit() is equivalent to _exit(), but _exit is in unistd.h and _Exit in stdlib, and I can't use stdlib.h for third reasons...
>>6
_Exit() is ISO C, _exit is not. They also behave differently. Use _Exit().
If you cannot include <stdlib.h> just include the prototype in scope: void _Exit(int);
Name:
Anonymous2008-05-19 14:52
>>7
Yes, _exit() is not a ISO C, _exit() is a unix syscall...
Then, why I can't use _exit()?
>>29
The board you are referring to may be still good, but your observation is not relevant to the topic or this board itself.
Speaking of which, in my opinion, the referred comment doesn't make this board better or worse. Which most of you may express directly with kind words such as "sage"
Name:
Anonymous2008-05-22 7:26
Add setsid(), and you have just reinvented daemonize()