I have a program (Crafty chess) that works just fine when started from the console. For my application I have daemonized it. When daemonizing a process, one is supposed to change the working directory to "/" via chdir("/")
.
When I follow that advice, the program exits in some use cases because it doesn't have the proper permissions in "/". When I don't chdir
, the program works, but just leaving out chdir
is a crutch.
Is there a sound alternative to omitting chdir("/")
?