73fd9f3c19
53356c1e-x86-HVM-correct-CPUID-leaf-80000008-handling.patch 533ad1ee-VMX-fix-PAT-value-seen-by-guest.patch 533d413b-x86-mm-fix-checks-against-max_mapped_pfn.patch - bnc#862608 - SLES 11 SP3 vm-install should get RHEL 7 support when released 53206661-pygrub-support-linux16-and-initrd16.patch - Upstream bug fixes 53299d8f-xenconsole-reset-tty-on-failure.patch 53299d8f-xenconsole-tolerate-tty-errors.patch - fix build for armv7l and aarch64 - Remove compiletime strings from qemu-upstream qemu-xen-upstream-megasas-buildtime.patch - bnc#871546 - KMPs are not signed in SUSE:SLE-12:GA? xen.spec - Upstream patches from Jan 532fff53-x86-fix-determination-of-bit-count-for-struct-domain-allocations.patch 5331917d-x86-enforce-preemption-in-HVM_set_mem_access-p2m_set_mem_access.patch - Drop xsa89.patch for upstream version (see bnc#867910, 5331917d-x86-enforce...) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=309
28 lines
929 B
Diff
28 lines
929 B
Diff
Index: xen-4.4.0-testing/tools/console/client/main.c
|
|
===================================================================
|
|
--- xen-4.4.0-testing.orig/tools/console/client/main.c
|
|
+++ xen-4.4.0-testing/tools/console/client/main.c
|
|
@@ -96,6 +96,7 @@ static int get_pty_fd(struct xs_handle *
|
|
* Assumes there is already a watch set in the store for this path. */
|
|
{
|
|
struct timeval tv;
|
|
+ struct flock lock;
|
|
fd_set watch_fdset;
|
|
int xs_fd = xs_fileno(xs), pty_fd = -1;
|
|
int start, now;
|
|
@@ -119,6 +120,14 @@ static int get_pty_fd(struct xs_handle *
|
|
pty_fd = open(pty_path, O_RDWR | O_NOCTTY);
|
|
if (pty_fd == -1)
|
|
warn("Could not open tty `%s'", pty_path);
|
|
+ else {
|
|
+ memset(&lock, 0, sizeof(lock));
|
|
+ lock.l_type = F_WRLCK;
|
|
+ lock.l_whence = SEEK_SET;
|
|
+ if (fcntl(pty_fd, F_SETLK, &lock) != 0)
|
|
+ err(errno, "Could not lock tty '%s'",
|
|
+ pty_path);
|
|
+ }
|
|
}
|
|
free(pty_path);
|
|
}
|