chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Handle possible EINTR in file-lock, file-l


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] [PATCH] Handle possible EINTR in file-lock, file-lock/blocking and, file-unlock.
Date: Mon, 6 Feb 2017 17:32:20 +0100
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.4.0

Am 05.02.2017 um 21:07 schrieb Peter Bex:
> On Wed, Feb 01, 2017 at 07:50:30PM +0100, Jörg F. Wittenberger wrote:
>> Hi all,
>>
>> I just found a couple of procedures in the posix unit, which did not
>> handle EINTR well.
> 
> The patch looks good to me.  I must say it's not completely clear from
> the manual what the intended semantics of the nonblocking file-lock
> procedure are.  I guess if another process has the file locked, we
> simply error out with "cannot lock file"?

This was at least the behavior the code did before.

Actually I'd rather love to see this changed into returning #f instead
of raising an error.

Reading the documentation, which is not clear at this point, I did
actually expect (as in "guess") this to be the case.

But that would be an incompatible change wrt. the current behavior.
Hence I did not mix this with the bugfix.

For compatibility with the currently implemented behavior I'd suggest to
change file-lock to accept one more optional argument: a procedure to be
called when we currently error out.

> If that behavious is inteneded, please apply the signed-off version
> attached.
> 
> Cheers,
> Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]