]> git.pld-linux.org Git - packages/blt.git/commitdiff
- patch from rawhide with fix tmp race.
authorkloczek <kloczek@pld-linux.org>
Fri, 5 Jan 2001 08:00:23 +0000 (08:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    blt-excl.patch -> 1.1

blt-excl.patch [new file with mode: 0644]

diff --git a/blt-excl.patch b/blt-excl.patch
new file mode 100644 (file)
index 0000000..a978549
--- /dev/null
@@ -0,0 +1,26 @@
+--- blt2.4u/src/bltUnixPipe.c.excl     Tue Feb 29 15:48:00 2000
++++ blt2.4u/src/bltUnixPipe.c  Wed Dec  6 17:58:43 2000
+@@ -27,6 +27,7 @@
+ #include "bltInt.h"
+ #include <fcntl.h>
++#include <limits.h>
+ #include <signal.h>
+ #include "bltWait.h"
+@@ -118,12 +119,12 @@
+ CreateTempFile(contents)
+     char *contents;           /* String to write into temp file, or NULL. */
+ {
+-    char fileName[L_tmpnam];
++    char fileName[LINE_MAX];
+     int fd;
+     size_t length = (contents == NULL) ? 0 : strlen(contents);
+-    tmpnam(fileName);
+-    fd = OpenFile(fileName, O_RDWR | O_CREAT | O_TRUNC);
++    strcpy(fileName, "/tmp/bltXXXXXX");
++    fd = mkstemp(fileName);
+     unlink(fileName);
+     if ((fd >= 0) && (length > 0)) {
This page took 0.104615 seconds and 4 git commands to generate.