diff options
| author | John Snow | 2020-10-09 19:51:23 +0200 |
|---|---|---|
| committer | John Snow | 2020-10-20 21:00:06 +0200 |
| commit | 39cf73c3494045b4418c9c1db8e803640e2150dc (patch) | |
| tree | a87dddc8e040a7819cafe109983c38ed02fc00df /include/exec/exec-all.h | |
| parent | python/qemu/qmp.py: re-raise OSError when encountered (diff) | |
| download | qemu-39cf73c3494045b4418c9c1db8e803640e2150dc.tar.gz qemu-39cf73c3494045b4418c9c1db8e803640e2150dc.tar.xz qemu-39cf73c3494045b4418c9c1db8e803640e2150dc.zip | |
python/qemu/qmp.py: Fix settimeout operation
We enabled callers to interface directly with settimeout, but this
reacts poorly with blocking/nonblocking operation; as they are using the
same internal mechanism.
1. Whenever we change the blocking mechanism temporarily, always set it
back to what it was afterwards.
2. Disallow callers from setting a timeout of "0", which means
Non-blocking mode. This is going to create more weird problems than
anybody wants, so just forbid it.
I opt not to coerce '0' to 'None' to maintain the principal of least
surprise in mirroring the semantics of Python's interface.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201009175123.249009-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'include/exec/exec-all.h')
0 files changed, 0 insertions, 0 deletions
