Help - Search - Members - Calendar
Full Version: daemon() - should it return?
Linuxhelp > Support > Programming in Linux
rij
Hello,

I am looking at a code which goes as follos:

if (daemon(0,0) != 0)
foo();
else
bar();

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.
michaelk
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.