1N/A * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. 1N/A * All rights reserved. 1N/A * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 1N/A * Copyright (c) 1988, 1993 1N/A * The Regents of the University of California. All rights reserved. 1N/A * By using this file, you agree to the terms and conditions set 1N/A * forth in the LICENSE file which can be found at the top level of 1N/A * the sendmail distribution. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A** LOCKFILE -- lock a file using flock or (shudder) fcntl locking 1N/A** fd -- the file descriptor of the file. 1N/A** filename -- the file name (for error messages). [unused] 1N/A** ext -- the filename extension. [unused] 1N/A** type -- type of the lock. Bits can be: 1N/A** LOCK_EX -- exclusive lock. 1N/A** LOCK_NB -- non-blocking. 1N/A** LOCK_UN -- unlock. 1N/A** true if the lock was acquired. 1N/A ** as type "tmp" (that is, served from swap space), the 1N/A ** previous fcntl will fail with "Invalid argument" errors. 1N/A ** Since this is fairly common during testing, we will assume 1N/A ** that this indicates that the lock is successfully grabbed. 1N/A#
else /* !HASFLOCK */ 1N/A#
endif /* !HASFLOCK */