discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Program occasionally crashes on startup due to GNUstepDefaults.lck e


From: Fred Kiefer
Subject: Re: Program occasionally crashes on startup due to GNUstepDefaults.lck error
Date: Mon, 19 Jun 2017 18:56:17 +0200

> Am 18.06.2017 um 10:20 schrieb Richard Frith-Macdonald 
> <richard.frith-macdonald@theengagehub.com>:
> 
>> 
>> On 17 Jun 2017, at 15:40, Wolfgang Lux <wolfgang.lux@gmail.com> wrote:
>> Thanks for committing the change for me, I was still in the process of 
>> switching my local checkout to git.
>> However, it looks like you got my comment slightly wrong. I didn't mean to 
>> say that using the 
>> createDirectoryAtPath:withIntermediateDirectories:attributes:error: method 
>> is wrong or that that method is broken in any way. It's just that calling it 
>> with the withIntermediateDirectories: argument set to YES is wrong because 
>> in that case the method return YES even if the directory already exists. 
>> Calling the method with NO for the second parameter would have been 
>> perfectly okay (unless the create method would indeed contain a bug).
> 
> I had looked at the code and seen that it counted creation as having 
> succeeded irrespective of the flag (which is why I opted to use the O/S 
> function directly).
> The documented behavior of the methods was not 100% clear on the point, so I 
> wrote a couple of testcases to check the actual behavior on OSX, and confirm 
> it is as you had thought.
> I've now altered the GNUstep behavior to match the OSX behavior and altered 
> the documentation to explicitly state what happens if the directory already 
> exists.

With that change in place, couldn’t we switch back to the old implementation 
for NSDistributedLock? I hate to see OS specific code scattered around in 
different places :-)




reply via email to

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