mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
command: reject pidfile on non-daemon
* src/util/command.c (virCommandRunAsync): Since virExec only creates pidfiles for daemon, enforce this in virCommand.
This commit is contained in:
parent
e904ce3c47
commit
ee691d8433
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user