aboutsummaryrefslogtreecommitdiffstats
path: root/CVSROOT/cfg.pm
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-08-19 20:17:05 +0800
committerjoe <joe@FreeBSD.org>2001-08-19 20:17:05 +0800
commitdfe9234e6cd7931e34a971aef1ce8168a84a0158 (patch)
tree3867c77756fdbb292f5f7a233c24f16d4451e8c0 /CVSROOT/cfg.pm
parent586ef1ebb9a0a038c597a2679703e1d90cfe3e1e (diff)
downloadfreebsd-ports-gnome-dfe9234e6cd7931e34a971aef1ce8168a84a0158.tar.gz
freebsd-ports-gnome-dfe9234e6cd7931e34a971aef1ce8168a84a0158.tar.zst
freebsd-ports-gnome-dfe9234e6cd7931e34a971aef1ce8168a84a0158.zip
Centralise the generation of temporary filenames instead of having
it done within each individual script.
Diffstat (limited to 'CVSROOT/cfg.pm')
-rwxr-xr-xCVSROOT/cfg.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/CVSROOT/cfg.pm b/CVSROOT/cfg.pm
index 4ada08a4c816..62bf354e1ecc 100755
--- a/CVSROOT/cfg.pm
+++ b/CVSROOT/cfg.pm
@@ -12,7 +12,7 @@ package cfg;
use strict;
use vars qw($DEBUG $FILE_PREFIX $MAILADDRS $MAILBANNER $MAILCMD
$MAIL_ON_DIR_CREATION $TMPDIR %TEMPLATE_HEADERS
- $LAST_FILE);
+ $LAST_FILE $PID);
######################
@@ -21,6 +21,9 @@ use vars qw($DEBUG $FILE_PREFIX $MAILADDRS $MAILBANNER $MAILCMD
### WARNING: these aren't global across all the scripts yet.
### This is work in progress.
+# Process group id; used as a unique number in temporary file names.
+$PID = getpgrp();
+
# Debug level, 0 = off, 1 = on.
$DEBUG = 0;
@@ -28,7 +31,7 @@ $DEBUG = 0;
$TMPDIR = "/tmp/";
# The filename prefix used for temporary files.
-$FILE_PREFIX = "#cvs.files";
+$FILE_PREFIX = "#cvs.files.$PID";
# The file used to store the name of the last directory examined
# when processing a multi-directory commit.