diff options
author | Ben Pfaff <blp@nicira.com> | 2010-03-16 15:06:11 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-03-18 11:23:50 -0700 |
commit | daf03c53ee14a0227b43330be2e638b9ad9ce022 (patch) | |
tree | 25f1cac8b4971db27cfa24f8c6b6a4e514a3c856 /lib/daemon.c | |
parent | 76f105d9be03588c2d5ec0b94ff769a1d269f2e4 (diff) |
util: New functions get_cwd(), abs_file_name().
These will be used further in an upcoming commit.
Diffstat (limited to 'lib/daemon.c')
-rw-r--r-- | lib/daemon.c | 6 |
1 files changed, 3 insertions, 3 deletions
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'. |