diff options
author | joe <joe@FreeBSD.org> | 2001-08-19 12:17:05 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-08-19 12:17:05 +0000 |
commit | dfe9234e6cd7931e34a971aef1ce8168a84a0158 (patch) | |
tree | 3867c77756fdbb292f5f7a233c24f16d4451e8c0 /CVSROOT/cfg.pm | |
parent | 586ef1ebb9a0a038c597a2679703e1d90cfe3e1e (diff) | |
download | FreeBSD-ports-dfe9234e6cd7931e34a971aef1ce8168a84a0158.zip FreeBSD-ports-dfe9234e6cd7931e34a971aef1ce8168a84a0158.tar.gz |
Centralise the generation of temporary filenames instead of having
it done within each individual script.
Diffstat (limited to 'CVSROOT/cfg.pm')
-rwxr-xr-x | CVSROOT/cfg.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CVSROOT/cfg.pm b/CVSROOT/cfg.pm index 4ada08a..62bf354 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. |