Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] milter-greylist 4.4 alpha1 is available

2012-02-28 by Oliver Fromme

manu@... wrote:
 > shuttlebox <shuttlebox@...> wrote:
 > 
 > > I'm using 4.8.30 and grep:ed the sources, found no trace of O_SHLOCK.
 > 
 > Reading the sources, the flag is passed to open(2). In Solaris open(2)
 > man page, I find no way to get an unexclusive lock on the file.

Just for the record:  O_SHLOCK and O_EXLOCK are BSD-extensions,
so SysV-based systems like Solaris/SunOS 5.x don't support it.

 > The simplier solution is to define it as 0. Unix locks are advisory
 > anyway. We could add a flock(LOCK_SH) but it is probably not worth the
 > trouble.

flock() is also a BSD-extension.  :-)  Solaris supports flock()
from its compatibility interfaces, but the implementation just
calls fcntl() underneath, which is a POSIX-standard.

So, the most portable and easiest way is to use only fcntl()
for locking on all platforms.  No #ifdef required.

Best regards
   Oliver


-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Gesch\ufffdftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M\ufffdn-
chen, HRB 125758,  Gesch\ufffdftsf\ufffdhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Life is short (You need Python)"
        -- Bruce Eckel, ANSI C++ Comitee member, author
           of "Thinking in C++" and "Thinking in Java"

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.