git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recording merge technique in git history
[exim.git]
/
src
/
src
/
exicyclog.src
diff --git
a/src/src/exicyclog.src
b/src/src/exicyclog.src
index 01d1f2feb2fd8aa82dced2dbc43c886287fb750f..c491b205b6f7cadaa86fabaf93b32966ad5cbf9b 100644
(file)
--- a/
src/src/exicyclog.src
+++ b/
src/src/exicyclog.src
@@
-1,6
+1,6
@@
#! /bin/sh
#! /bin/sh
-# Copyright (c) University of Cambridge, 1995 - 20
07
+# Copyright (c) University of Cambridge, 1995 - 20
15
# See the file NOTICE for conditions of use and distribution.
# This script takes the following command line arguments:
# See the file NOTICE for conditions of use and distribution.
# This script takes the following command line arguments:
@@
-282,28
+282,34
@@
done
if [ $keep -gt 99 ]; then first=001; else first=01; fi
if [ $keep -gt 99 ]; then first=001; else first=01; fi
+# Grab our pid ro avoid race in file creation
+ourpid=$$
+
if [ -f $mainlog ]; then
$mv $mainlog $mainlog.$first
$chown $user:$group $mainlog.$first
if [ -f $mainlog ]; then
$mv $mainlog $mainlog.$first
$chown $user:$group $mainlog.$first
- $touch $mainlog
- $chown $user:$group $mainlog
- $chmod 640 $mainlog
+ $touch $mainlog.$ourpid
+ $chown $user:$group $mainlog.$ourpid
+ $chmod 640 $mainlog.$ourpid
+ $mv $mainlog.$ourpid $mainlog
fi
if [ -f $rejectlog ]; then
$mv $rejectlog $rejectlog.$first
$chown $user:$group $rejectlog.$first
fi
if [ -f $rejectlog ]; then
$mv $rejectlog $rejectlog.$first
$chown $user:$group $rejectlog.$first
- $touch $rejectlog
- $chown $user:$group $rejectlog
- $chmod 640 $rejectlog
+ $touch $rejectlog.$ourpid
+ $chown $user:$group $rejectlog.$ourpid
+ $chmod 640 $rejectlog.$ourpid
+ $mv $rejectlog.$ourpid $rejectlog
fi
if [ -f $paniclog ]; then
$mv $paniclog $paniclog.$first
$chown $user:$group $paniclog.$first
fi
if [ -f $paniclog ]; then
$mv $paniclog $paniclog.$first
$chown $user:$group $paniclog.$first
- $touch $paniclog
- $chown $user:$group $paniclog
- $chmod 640 $paniclog
+ $touch $paniclog.$ourpid
+ $chown $user:$group $paniclog.$ourpid
+ $chmod 640 $paniclog.$ourpid
+ $mv $paniclog.$ourpid $paniclog
fi
# Now scan the (0)02 and later files, compressing where necessary, and
fi
# Now scan the (0)02 and later files, compressing where necessary, and