]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix locking in virsh console
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 10 Mar 2014 10:51:32 +0000 (14:51 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 10 Mar 2014 10:51:32 +0000 (14:51 +0400)
commit356bf55e98b9e5d6abbd9a382abfe4e495f72314
tree527e093f4ffb6c4be514d3de50388c6a42238cb3
parentfb235130fed239ceb9484a4a74d1936b6d0beba2
Fix locking in virsh console

vshRunConsole() uses virCondWait() which is a wrapper around
pthread_cond_wait(). On FreeBSD, pthread_cond_wait needs mutex to be
locked, otherwise it immediately fails with EPERM. On Linux, the
behaviour in this case is undefined.

So lock the mutex before calling virCondWait().
tools/virsh-console.c