From: Jeremy Henty Date: 2002-12-16T17:40:53+09:00 Subject: Re: Ruby BUG when using PStore and fork In article <87vg1wxu1x.fsf@squeaker.lickey.com>, Matt Armstrong wrote: > After experimenting, there is a way to close the PStore file in the > child process in ruby 1.7. > > This program demonstrates it. In a PStore transaction, it forks a > child that just loops 5 times printing a message, sleeping between. > Without the call to close_extra_files, the child blocks the parent's > 2nd attempt to start a transaction. With the call, it ends up closing > the PStore file it inherits from its parent and allows the parent to > open the PStore file again. Aha! Presumably because (according to the close() man page) closing the file descriptor releases any locks on the file. Maybe PStore could do with a new method that closes its file? Regards, Jeremy Henty