aboutsummaryrefslogtreecommitdiff
path: root/x11-servers/xorg-server/files/patch-os-utils.c
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2011-10-18 18:25:44 +0000
committerKoop Mast <kwm@FreeBSD.org>2011-10-18 18:25:44 +0000
commit185fd9100b9edcb1cf802b26853ac48914c83bf9 (patch)
tree6c8c6a5f09479aba8c610c2e98da6838de729e4d /x11-servers/xorg-server/files/patch-os-utils.c
parent9e57e1808adcf61a3d2dae63d9f697899aa97e9c (diff)
downloadports-185fd9100b9edcb1cf802b26853ac48914c83bf9.tar.gz
ports-185fd9100b9edcb1cf802b26853ac48914c83bf9.zip
Notes
Diffstat (limited to 'x11-servers/xorg-server/files/patch-os-utils.c')
-rw-r--r--x11-servers/xorg-server/files/patch-os-utils.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/x11-servers/xorg-server/files/patch-os-utils.c b/x11-servers/xorg-server/files/patch-os-utils.c
index a5509b86539a..3fe8530231e9 100644
--- a/x11-servers/xorg-server/files/patch-os-utils.c
+++ b/x11-servers/xorg-server/files/patch-os-utils.c
@@ -1,6 +1,24 @@
---- os/utils.c.orig 2007-08-23 15:04:55.000000000 -0400
-+++ os/utils.c 2008-02-29 13:11:01.000000000 -0500
-@@ -525,7 +525,11 @@
+--- os/utils.c.orig 2010-05-04 02:48:00.000000000 +0200
++++ os/utils.c 2011-10-18 20:08:10.000000000 +0200
+@@ -315,7 +315,7 @@
+ FatalError("Could not create lock file in %s\n", tmp);
+ (void) sprintf(pid_str, "%10ld\n", (long)getpid());
+ (void) write(lfd, pid_str, 11);
+- (void) chmod(tmp, 0444);
++ (void) fchmod(tmp, 0444);
+ (void) close(lfd);
+
+ /*
+@@ -336,7 +336,7 @@
+ /*
+ * Read the pid from the existing file
+ */
+- lfd = open(LockFile, O_RDONLY);
++ lfd = open(LockFile, O_RDONLY|O_NOFOLLOW);
+ if (lfd < 0) {
+ unlink(tmp);
+ FatalError("Can't read lock file %s\n", LockFile);
+@@ -436,7 +436,11 @@
#ifdef MONOTONIC_CLOCK
struct timespec tp;