mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +00:00
Rename virKillProcess to virProcessKill
Changing naming to follow the convention of "object" followed by "action" Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
1532bd498a
commit
cf470068a1
@ -219,7 +219,7 @@ qemuAgentOpenUnix(const char *monitor, pid_t cpid, bool *inProgress)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if ((errno == ENOENT || errno == ECONNREFUSED) &&
|
if ((errno == ENOENT || errno == ECONNREFUSED) &&
|
||||||
virKillProcess(cpid, 0) == 0) {
|
virProcessKill(cpid, 0) == 0) {
|
||||||
/* ENOENT : Socket may not have shown up yet
|
/* ENOENT : Socket may not have shown up yet
|
||||||
* ECONNREFUSED : Leftover socket hasn't been removed yet */
|
* ECONNREFUSED : Leftover socket hasn't been removed yet */
|
||||||
continue;
|
continue;
|
||||||
|
@ -283,7 +283,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if ((errno == ENOENT || errno == ECONNREFUSED) &&
|
if ((errno == ENOENT || errno == ECONNREFUSED) &&
|
||||||
virKillProcess(cpid, 0) == 0) {
|
virProcessKill(cpid, 0) == 0) {
|
||||||
/* ENOENT : Socket may not have shown up yet
|
/* ENOENT : Socket may not have shown up yet
|
||||||
* ECONNREFUSED : Leftover socket hasn't been removed yet */
|
* ECONNREFUSED : Leftover socket hasn't been removed yet */
|
||||||
continue;
|
continue;
|
||||||
|
@ -3920,7 +3920,7 @@ qemuProcessKill(struct qemud_driver *driver,
|
|||||||
signum = 0; /* Just check for existence */
|
signum = 0; /* Just check for existence */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virKillProcess(vm->pid, signum) < 0) {
|
if (virProcessKill(vm->pid, signum) < 0) {
|
||||||
if (errno != ESRCH) {
|
if (errno != ESRCH) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
VIR_WARN("Failed to terminate process %d with SIG%s: %s",
|
VIR_WARN("Failed to terminate process %d with SIG%s: %s",
|
||||||
|
@ -1128,7 +1128,7 @@ static void umlShutdownVMDaemon(struct uml_driver *driver,
|
|||||||
if (!virDomainObjIsActive(vm))
|
if (!virDomainObjIsActive(vm))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
virKillProcess(vm->pid, SIGTERM);
|
virProcessKill(vm->pid, SIGTERM);
|
||||||
|
|
||||||
VIR_FORCE_CLOSE(priv->monitor);
|
VIR_FORCE_CLOSE(priv->monitor);
|
||||||
|
|
||||||
|
@ -2290,7 +2290,7 @@ check_and_return:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* send signal to a single process */
|
/* send signal to a single process */
|
||||||
int virKillProcess(pid_t pid, int sig)
|
int virProcessKill(pid_t pid, int sig)
|
||||||
{
|
{
|
||||||
if (pid <= 1) {
|
if (pid <= 1) {
|
||||||
errno = ESRCH;
|
errno = ESRCH;
|
||||||
|
@ -255,7 +255,7 @@ static inline int getgid (void) { return 0; }
|
|||||||
|
|
||||||
char *virGetHostname(virConnectPtr conn);
|
char *virGetHostname(virConnectPtr conn);
|
||||||
|
|
||||||
int virKillProcess(pid_t pid, int sig);
|
int virProcessKill(pid_t pid, int sig);
|
||||||
|
|
||||||
char *virGetUserDirectory(void);
|
char *virGetUserDirectory(void);
|
||||||
char *virGetUserConfigDirectory(void);
|
char *virGetUserConfigDirectory(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user