X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdaemon.c;h=081912b128c230c59550608059ea4cdc9a8b25a0;hb=7dab724e7d49b3fbaeed67b9d3d22378996a604e;hp=46c9a88e750bc554cda1c92393a6412bd7eba633;hpb=b2d06cb8cbafe6c759f80c3b12691fef7ae2712a;p=sliver-openvswitch.git diff --git a/lib/daemon.c b/lib/daemon.c index 46c9a88e7..081912b12 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -58,9 +58,9 @@ static bool monitor; char * make_pidfile_name(const char *name) { - return (!name ? xasprintf("%s/%s.pid", ovs_rundir, program_name) - : *name == '/' ? xstrdup(name) - : xasprintf("%s/%s", ovs_rundir, name)); + return (!name + ? xasprintf("%s/%s.pid", ovs_rundir, program_name) + : abs_file_name(ovs_rundir, name)); } /* Sets up a following call to daemonize() to create a pidfile named 'name'.