if (!lockd)
return;
+ virMutexDestroy(&lockd->lock);
virObjectUnref(lockd->dmn);
virHashFree(lockd->lockspaces);
virLockSpaceFree(lockd->defaultLockspace);
old_umask = umask(077);
if (virFileMakePath(rundir) < 0) {
+ VIR_FREE(rundir);
umask(old_umask);
goto error;
}
old_umask = umask(077);
if (virFileMakePath(logdir) < 0) {
+ VIR_FREE(logdir);
umask(old_umask);
goto error;
}
int c;
char *tmp;
- c = getopt_long(argc, argv, "ldf:p:t:vVh", opts, &optidx);
+ c = getopt_long(argc, argv, "df:p:t:vVh", opts, &optidx);
if (c == -1)
break;
VIR_ERROR(_("unable to create rundir %s: %s"), run_dir,
virStrerror(errno, ebuf, sizeof(ebuf)));
ret = VIR_LOCK_DAEMON_ERR_RUNDIR;
+ umask(old_umask);
goto cleanup;
}
umask(old_umask);
=head1 SYNOPSIS
-B<virtlockd> [ -dv ] [ -f config_file ] [ -p pid_file ]
+B<virtlockd> [ -dvV ] [ -t timeout] [ -f config_file ] [ -p pid_file ]
B<virtlockd> --version
Use this configuration file, overriding the default value.
+=item B<-t, --timeout> I<SECONDS>
+
+Automatically shutdown after I<SECONDS> have elapsed with
+no active client or lock.
+
=item B<-p, --pid-file> I<FILE>
Use this name for the PID file, overriding the default value.