diff options
author | Stefan Hajnoczi | 2011-05-25 20:48:01 +0200 |
---|---|---|
committer | Luiz Capitulino | 2011-06-01 16:43:18 +0200 |
commit | 37628f11c6b190ebb3082938868aadb23942ee3a (patch) | |
tree | 6c97f37b0f3262d6c32d0074699ce2651399cc10 /qemu-timer.c | |
parent | QMP: add get_events(wait=True) option (diff) | |
download | qemu-37628f11c6b190ebb3082938868aadb23942ee3a.tar.gz qemu-37628f11c6b190ebb3082938868aadb23942ee3a.tar.xz qemu-37628f11c6b190ebb3082938868aadb23942ee3a.zip |
QMP: add server mode to QEMUMonitorProtocol
QEMU supports socket chardevs that establish connections like a server
or a client. The QEMUMonitorProtocol class only supports connecting as
a client. It is not possible to connect race-free when launching QEMU
since trying to connect before QEMU has bound and is listening on the
socket results in failure.
Add the QEMUMonitorProtocol(server=True) argument to bind and listen on
the socket. The QEMU process can then be launched and connects to the
already existing QMP socket without a race condition:
qmp = qmp.QEMUMonitorProtocol(monitor_path, server=True)
popen = subprocess.Popen(args)
qmp.accept()
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qemu-timer.c')
0 files changed, 0 insertions, 0 deletions