xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 25 10:24:26 UTC 2021
os/utils.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit d4b38e111946b934d0f8438dc295dd9f7316318c
Author: Olivier Certner <olce.freedesktop at certner.fr>
Date: Tue Feb 9 10:49:00 2021 +0100
os: Properly report failure to link lock file
Stop assuming that a failure to link always means that the file indeed
exists. In case of other failure (e.g., permissions), the user would get an
inconsistent "Can't read lock file" message.
Signed-off-by: Olivier Certner <olce.freedesktop at certner.fr>
diff --git a/os/utils.c b/os/utils.c
index c3565f971..231554954 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -329,7 +329,7 @@ LockServer(void)
*/
break;
}
- else {
+ else if (errno == EEXIST) {
/*
* Read the pid from the existing file
*/
@@ -374,6 +374,12 @@ LockServer(void)
LockFile, "\tand start again.");
}
}
+ else {
+ unlink(tmp);
+ FatalError
+ ("Linking lock file (%s) in place failed: %s\n",
+ LockFile, strerror(errno));
+ }
}
unlink(tmp);
if (!haslock)
More information about the xorg-commit
mailing list