提交 ee691d84 编写于 作者: E Eric Blake

command: reject pidfile on non-daemon

* src/util/command.c (virCommandRunAsync): Since virExec only
creates pidfiles for daemon, enforce this in virCommand.
上级 e904ce3c
......@@ -1146,7 +1146,11 @@ virCommandRunAsync(virCommandPtr cmd, pid_t *pid)
cmd->pwd);
return -1;
}
if (cmd->pidfile && !(cmd->flags & VIR_EXEC_DAEMON)) {
virCommandError(VIR_ERR_INTERNAL_ERROR, "%s",
_("creation of pid file requires daemonized command"));
return -1;
}
str = virCommandToString(cmd);
VIR_DEBUG("About to run %s", str ? str : cmd->args[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册