X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdaemon.c;h=081912b128c230c59550608059ea4cdc9a8b25a0;hb=0f07ce33c49ce522d69c0e6aab8ca7ce0757e98c;hp=46c9a88e750bc554cda1c92393a6412bd7eba633;hpb=b2d06cb8cbafe6c759f80c3b12691fef7ae2712a;p=openvswitch diff --git a/lib/daemon.c b/lib/daemon.c index 46c9a88e..081912b1 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'.