abf8af324b
- Include systemd presets in 13.2 and older - bnc#897352 - Enable xencommons/xendomains only during fresh install - disable restart on upgrade because the toolstack is not restartable - adjust seabios, vgabios, stubdom and hvmloader build to reduce build-compare noise xen.build-compare.mini-os.patch xen.build-compare.smbiosdate.patch xen.build-compare.ipxe.patch xen.build-compare.vgabios.patch xen.build-compare.seabios.patch xen.build-compare.man.patch - Update to Xen 4.5.0 RC4 - Remove xend specific if-up scripts Recording bridge slaves is a generic task which should be handled by generic network code - Use systemd features from upstream requires updated systemd-presets-branding package - Update to Xen 4.5.0 RC3 - Set GIT, WGET and FTP to /bin/false - Use new configure features instead of make variables OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=337
28 lines
929 B
Diff
28 lines
929 B
Diff
Index: xen-4.5.0-testing/tools/console/client/main.c
|
|
===================================================================
|
|
--- xen-4.5.0-testing.orig/tools/console/client/main.c
|
|
+++ xen-4.5.0-testing/tools/console/client/main.c
|
|
@@ -95,6 +95,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;
|
|
@@ -118,6 +119,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);
|
|
}
|