800917b5a2
- Update to Xen 4.1.2_rc2 c/s 23152 - bnc#716695 - domUs using tap devices will not start updated multi-xvdp.patch - Upstream patches from Jan 23803-intel-pmu-models.patch 23800-x86_64-guest-addr-range.patch 23795-intel-ich10-quirk.patch 23804-x86-IPI-counts.patch - bnc#706106 - Inconsistent reporting of VM names during migration xend-migration-domname-fix.patch - bnc#712823 - L3:Xen guest does not start reliable when rebooted xend-vcpu-affinity-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
26 lines
874 B
Diff
26 lines
874 B
Diff
Index: xen-4.1.2-testing/tools/console/client/main.c
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/tools/console/client/main.c
|
|
+++ xen-4.1.2-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;
|
|
@@ -122,6 +123,12 @@ static int get_pty_fd(struct xs_handle *
|
|
if (pty_fd == -1)
|
|
err(errno, "Could not open tty `%s'",
|
|
pty_path);
|
|
+ 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);
|
|
}
|
|
}
|