[Klone-users] Use relative paths in kloned.conf

Mickael Auger mickael.auger at gmail.com
Tue Jul 21 10:42:40 EDT 2009


Hi KLone team,

I hope you have had nice holidays ;)

*** My objective : ***
Use relative paths in kloned.conf (because the directory depends of unknown
installation folder).

*** My problem : ***
I cannot use relative paths in my kloned.conf because "./" is replaced by
"/".

For example,
my KLone binary ("kloned") is located in "/home/user1/"
my kloned.conf specifies the log file :
====================================
log
{
    type                     file
    file.basename       ./tmp/log
}
====================================
However, if I execute :
     $ cd /home/user1
     /home/user1$ ./kloned

the path "." is replace by "/" instead of "/home/user1/" and the getcwd()
function gives the path "/".

But if I execute :
     $ cd /home/user1
     /home/user1/$ ./kloned -F

the path "." is replace by "/home/user1/" and the getcwd() function gives
the same path.

This problem is linked to call daemon() function in "src/kloned/entry.c" and
redefined in "libu/srcs/missing/daemon.c" that use "chdir("/")" :

   con_err_ifm(daemon(0, 0), "daemon error"); //line 401 src/kloned/entry.c

We wish have the possibilty to call daemon() with daemon(1, 0).

** My question : **

Could you offer us an option in the main makefile as
"--enabled_chdir_daemon" to add the value 1 to daemon() function ?


Thanks.

-- 
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090721/5a205064/attachment.html


More information about the klone-users mailing list