Open the lock file write-only.

This commit is contained in:
Dag-Erling Smørgrav 2006-03-21 08:08:58 +00:00
parent 5990647d42
commit e2ed8189e9

View File

@ -575,7 +575,7 @@ MAIN:{
die("invalid lockfile\n");
}
$lockfile = $1;
$lock = open_locked($lockfile, O_CREAT, 0600)
$lock = open_locked($lockfile, O_WRONLY|O_CREAT, 0600)
or die("unable to acquire lock on $lockfile\n");
# Lock will be released upon termination.
}