On Windows if a relative file name is given to --pidfile parameter
(not containing ':') then the application name is used for PID file,
ignoring the given name.
Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
char *
make_pidfile_name(const char *name)
{
- if (name && strchr(name, ':')) {
- return xstrdup(name);
+ if (name) {
+ if (strchr(name, ':')) {
+ return xstrdup(name);
+ } else {
+ return xasprintf("%s/%s", ovs_rundir(), name);
+ }
} else {
return xasprintf("%s/%s.pid", ovs_rundir(), program_name);
}