Re: Same .leo file open from different leo instances

2012-05-09 Thread SegundoBob
On Monday, May 7, 2012 9:07:48 AM UTC-7, Edward K. Ream wrote: There are still problems when exit is irregular. I don't have any suggestions for directly eliminating the irregular exit problems, but I do suggest that using a file descriptor based scheme might be better than your pid based

Re: Same .leo file open from different leo instances

2012-05-09 Thread Terry Brown
On Wed, 9 May 2012 17:20:47 -0700 (PDT) SegundoBob bhoss...@ieee.org wrote: I assume that if a process terminates without explicitly releasing a lock, then the lock remains in effect a least until the system is rebooted. I hope, but do not know, that a lock does not persist over a reboot.

Re: Same .leo file open from different leo instances

2012-05-07 Thread Edward K. Ream
On Mon, May 7, 2012 at 10:44 AM, Terry Brown terry_n_br...@yahoo.com wrote: The logic seems to have a problem, it complained me about open leo file (workbook.leo) when I was launching the first leo instance. Typically, you should store process id of the leo process keeping the file open in

Re: Same .leo file open from different leo instances

2012-05-07 Thread Terry Brown
On Mon, 7 May 2012 11:07:48 -0500 Edward K. Ream edream...@gmail.com wrote: There are still problems when exit is irregular. Which are apparently permanent? My default opening of Leo opens four outlines in tabs, so getting the message four times is problematic. I was starting to investigate

Re: Same .leo file open from different leo instances

2012-05-07 Thread Terry Brown
On Sat, 28 Apr 2012 22:46:02 +0300 Ville M. Vainio vivai...@gmail.com wrote: Typically, you should store process id of the leo process keeping the file open in g.app.db. That way, if you see that the file is reported to be open by a process that no longer exists, you know it's stale data.

Re: Same .leo file open from different leo instances

2012-04-28 Thread Ville M. Vainio
The logic seems to have a problem, it complained me about open leo file (workbook.leo) when I was launching the first leo instance. Typically, you should store process id of the leo process keeping the file open in g.app.db. That way, if you see that the file is reported to be open by a process

Re: Same .leo file open from different leo instances

2012-04-27 Thread Matt Wilkie
On opening a .leo file, I'd encourage to check whether it's open in another leo process, and complain loudly if it is. ...and perhaps show unified diff on attempted save. -- -matt -- You received this message because you are subscribed to the Google Groups leo-editor group. To post to this

Re: Same .leo file open from different leo instances

2012-04-27 Thread Edward K. Ream
On Fri, Apr 27, 2012 at 5:32 AM, Ville M. Vainio vivai...@gmail.com wrote: I may have reported this before https://bugs.launchpad.net/leo-editor/+bug/711158 On opening a .leo file, I'd encourage to check whether it's open in another leo process, and complain loudly if it is. You can use

Re: Same .leo file open from different leo instances

2012-04-27 Thread Edward K. Ream
On Fri, Apr 27, 2012 at 11:11 AM, Edward K. Ream You can use c.db, g.app.db or old fashioned lock files (~/.leo/locks/workbook.leo.lock) to do this. Good timing.  I looked at this a bit yesterday.  I'll see what I can do today. Rev 5285 fixes this using g.app.db. This is fundamentally

RE: Same .leo file open from different leo instances

2012-04-27 Thread Ville Vainio
: Same .leo file open from different leo instances On Fri, Apr 27, 2012 at 11:11 AM, Edward K. Ream You can use c.db, g.app.db or old fashioned lock files (~/.leo/locks/workbook.leo.lock) to do this. Good timing.  I looked at this a bit yesterday.  I'll see what I can do today. Rev 5285 fixes

Re: Same .leo file open from different leo instances

2012-04-27 Thread Edward K. Ream
On Fri, Apr 27, 2012 at 11:40 AM, Ville Vainio vivai...@gmail.com wrote: Edward, I'd appreciate if you didn't use the word 'cache' ,:) Fair enough. And now g.db is available even when --no-cache is in effect. I'll ensure that c.db always exists immediately. EKR -- You received this message