tigervnc, xvfb: use rename(2) instead of symlink(2) when creating lock file
Fixes issues with stale lock files in case Xvnc was killed. Note: original implementation of locking uses link(2) which is disallowed by seccomp on Android 8 or later.
This commit is contained in:
parent
b469daa734
commit
3faa2eeb0c
|
@ -2,7 +2,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
|||
|
||||
TERMUX_PKG_HOMEPAGE=http://www.tigervnc.org/
|
||||
TERMUX_PKG_VERSION=1.9.0
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_REVISION=8
|
||||
TERMUX_PKG_DESCRIPTION="Suite of VNC servers. Based on the VNC 4 branch of TightVNC."
|
||||
TERMUX_PKG_SRCURL=https://github.com/TigerVNC/tigervnc/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740
|
||||
|
|
|
@ -3,7 +3,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
|||
TERMUX_PKG_HOMEPAGE=http://xorg.freedesktop.org/
|
||||
TERMUX_PKG_DESCRIPTION="X virtual framebuffer"
|
||||
TERMUX_PKG_VERSION=1.20.1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=59c99fe86fe75b8164c6567bfc6e982aecc2e4a51e6fbac1b842d5d00549e918
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
|
||||
--- xorg-server-1.20.1/os/utils.c 2018-08-07 19:31:05.000000000 +0300
|
||||
+++ xorg-server-1.20.1.mod/os/utils.c 2018-09-11 23:52:17.498159434 +0300
|
||||
+++ xorg-server-1.20.1.mod/os/utils.c 2018-10-02 15:18:51.990102574 +0300
|
||||
@@ -228,7 +228,7 @@
|
||||
* server at a time. This keeps the servers from stomping on each other
|
||||
* if the user forgets to give them different display numbers.
|
||||
|
@ -15,7 +15,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
|
|||
haslock = 0;
|
||||
while ((!haslock) && (i++ < 3)) {
|
||||
- haslock = (link(tmp, LockFile) == 0);
|
||||
+ haslock = (symlink(tmp, LockFile) == 0);
|
||||
+ haslock = (rename(tmp, LockFile) == 0);
|
||||
if (haslock) {
|
||||
/*
|
||||
* We're done.
|
||||
|
|
Loading…
Reference in New Issue