Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2000 16:39:17 -0500 (EST)
From:      Mike Heffner <mheffner@mailandnews.com>
To:        FreeBSD-audit <FreeBSD-audit@freebsd.org>
Subject:   lorder tempfiles
Message-ID:  <XFMail.20000126163917.mheffner@mailandnews.com>

next in thread | raw e-mail | index | archive | help
While doing a make world, lorder is run and creates a bunch of tempfiles like
this:
+  -rw-r--r--  1  root     wheel    625    Jan 25 21:05 /tmp/_symbol_24973
+  -rw-r--r--  1  root     wheel    842    Jan 25 21:05 /tmp/_reference_24973
-  -rw-r--r--  1  root     wheel    842    Jan 25 21:05 /tmp/_reference_24973
-  -rw-r--r--  1  root     wheel    625    Jan 25 21:05 /tmp/_symbol_24973 

they're usually in that order. Could we use mktemp(1) to make it slightly more
random? Here's a patch:

Index: lorder.sh
===================================================================
RCS file: /home/ncvs/src/usr.bin/lorder/lorder.sh,v
retrieving revision 1.2
diff -u -r1.2 lorder.sh
--- lorder.sh   1998/08/15 07:10:21     1.2
+++ lorder.sh   2000/01/26 21:36:19
@@ -45,8 +45,8 @@
 esac
 
 # temporary files
-R=/tmp/_reference_$$
-S=/tmp/_symbol_$$
+R=`mktemp /tmp/_reference_XXXXXXXXXX`
+S=`mktemp /tmp/_symbol_XXXXXXXXXX`
 
 # remove temporary files on HUP, INT, QUIT, PIPE, TERM
 trap "rm -f $R $S; exit 1" 1 2 3 13 15


---------------------------------
Mike Heffner <spock@techfour.net>
Fredericksburg, VA
ICQ# 882073
Date: 26-Jan-2000   Time: 16:29:32
---------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20000126163917.mheffner>