Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ daemon() - should it return?

Posted by: rij Apr 20 2009, 07:30 PM


I am looking at a code which goes as follos:

if (daemon(0,0) != 0)

When I run the code, neither foo() nor bar() gets executed. Could someone please shed some light?

I am using CentOS 5.

Thanks in advance.

Posted by: michaelk Apr 21 2009, 05:46 PM

What code are you trying to run? Looks like an example to me and not real source code.

Typically foo, bar or foobar are used in generic terms and hopefully not real function names.
foobar -> FUBAR

Powered by Invision Power Board (
© Invision Power Services (