Jordi Soucheiron wrote:
> What do you mean with partially?
>
> 2009/1/15 pouettagada < <>>
>
> Hello all, I've wrote a socket-server application in C. It works
> perfectly if I run it my self. But when I wrote a script to run it
> just after the init (as a daemon), my application works partially.
> How is it possible? There is something to do for a daemon?
>
>
>
Jordi,
That's not a particularly detailed description of your problem.
Just as a guess, if you're calling daemon() you need to be careful:
1) std in/out will be redirected, and
2) Environment variables will vanish.
You need to check these things whenever calling daemon(). I worked
around #2 by copying the environment variables, and re-setting them
after the daemon call.
-Brett
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|