Re: [Exim] Cygwin port: two small requests

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Pierre A. Humblet
CC: exim-users
Betreff: Re: [Exim] Cygwin port: two small requests
On Tue, 4 Dec 2001, Pierre A. Humblet wrote:

> There is a simple solution: the subprocess does an lseek()
> to skip the first DATA_START_OFFSET bytes. Thus the desired
> locking effect can be obtained by locking ONLY the first
> DATA_START_OFFSET bytes, while not hindering the read().
> Concretely line 74 of spool_in.c,
>
> lock_data.l_whence = lock_data.l_start = lock_data.l_len = 0;
>
> can be replaced by
>
> lock_data.l_type = F_WRLCK;    /* Only lock the first line */
> lock_data.l_whence = SEEK_SET;
> lock_data.l_start = 0;
> lock_data.l_len = DATA_START_OFFSET;

>
> I don't think this has any negative consequences.


That seems plausible.

> Standard C allows to add a "b" to the mode string ("rb" or "wb")
> to avoid these effects. The "b" has no effect on standard Unix
> systems. Could you add it in all Exim files?


That certainly will do no harm.

>      2) With those changes + native gdbm, I have Exim running under Win98.
>         Assuming no bad surprises, this might greatly increase the number
>         of Exim users.


Do I *want* a lot of Windows users??? :-))

I will look at those changes as part of the Exim 4 alpha testing which
is currently happening.

Philip

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.