return;
qemuProcessQMPStop(proc);
+
+ g_object_unref(proc->eventThread);
+
VIR_FREE(proc->binary);
VIR_FREE(proc->libDir);
VIR_FREE(proc->uniqDir);
{
qemuProcessQMPPtr ret = NULL;
qemuProcessQMPPtr proc = NULL;
+ const char *threadSuffix;
+ g_autofree char *threadName = NULL;
VIR_DEBUG("exec=%s, libDir=%s, runUid=%u, runGid=%u, forceTCG=%d",
binary, libDir, runUid, runGid, forceTCG);
proc->runGid = runGid;
proc->forceTCG = forceTCG;
+ threadSuffix = strrchr(binary, '-');
+ if (threadSuffix)
+ threadSuffix++;
+ else
+ threadSuffix = binary;
+ threadName = g_strdup_printf("qmp-%s", threadSuffix);
+
+ if (!(proc->eventThread = virEventThreadNew(threadName)))
+ goto cleanup;
+
ret = g_steal_pointer(&proc);
cleanup:
#include "qemu_conf.h"
#include "qemu_domain.h"
#include "virstoragefile.h"
+#include "vireventthread.h"
int qemuProcessPrepareMonitorChr(virDomainChrSourceDefPtr monConfig,
const char *domainDir);
char *monpath;
char *pidfile;
char *uniqDir;
+ virEventThread *eventThread;
virCommandPtr cmd;
qemuMonitorPtr mon;
pid_t pid;