From: Jeremy Henty Date: 2002-12-14T21:34:52+09:00 Subject: Re: Ruby BUG when using PStore and fork In article <873cp128ap.fsf@squeaker.lickey.com>, Matt Armstrong wrote: > ahoward writes: > >> i have gotten around this problem by spawning another process using >> the unix at command with a time of 'now' > > system("thecommand &") This doesn't solve the problem, which was that the child process inherits a lock on the pstore archive. This stops anything else using the archive even though no process is currently doing anything with it. The "at now" trick works because the child process simply schedules a job to do the business and terminates. The job itself is forked from a daemon, so it does not get the lock. I now have a better solution which preforks a child *before* opening the archive. The parent then tells the child when it needs a new process created and the child does the work. So the forking process has no lock, hence there is no proliferation of unnecessary locks. Regards, Jeremy Henty