Re: [Rosegarden-user] New(ish) lock feature.

2016-06-27 Thread Abrolag
On Mon, 27 Jun 2016 11:01:20 -0400
"D. Michael McIntyre"  wrote:

> On 06/27/2016 06:51 AM, Ted Felix wrote:
> > On 06/27/2016 02:28 AM, Johan Vromans wrote:  
> 
> >> Unless I didn't get the story well, why not use the standard technique
> >> to write the process id in the lock file, and remove and existing lock file
> >> when the associated process is no longer there?  
> >
> > So long as the hostnames match, this sounds like it might work.  
> 
> I don't think either one of us ever thought of that.  It does sound 
> promising.
> 

Certainly looks interest. I'd never have thought of that either.

-- 
W J G

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-27 Thread D. Michael McIntyre
On 06/27/2016 06:51 AM, Ted Felix wrote:
> On 06/27/2016 02:28 AM, Johan Vromans wrote:

>> Unless I didn't get the story well, why not use the standard technique
>> to write the process id in the lock file, and remove and existing lock file
>> when the associated process is no longer there?
>
> So long as the hostnames match, this sounds like it might work.

I don't think either one of us ever thought of that.  It does sound 
promising.

-- 
D. Michael McIntyre

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-27 Thread Ted Felix
On 06/27/2016 02:28 AM, Johan Vromans wrote:
> Unless I didn't get the story well, why not use the standard technique
> to write the process id in the lock file, and remove and existing lock file
> when the associated process is no longer there?

   So long as the hostnames match, this sounds like it might work.

Ted.

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread Johan Vromans
On Sun, 26 Jun 2016 23:46:34 -0400
"D. Michael McIntyre"  wrote:

> Most of the time I run into lock files being an irritation, it's due to 
> a crash, and I'll be trying again very shortly thereafter.  If it has to 
> wait an hour to be orphaned, that isn't going to do developers any good.
> 

Unless I didn't get the story well, why not use the standard technique 
to write the process id in the lock file, and remove and existing lock file
when the associated process is no longer there?

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread D. Michael McIntyre
On 06/26/2016 05:24 PM, Abrolag wrote:

> I'm steadily more inclined to think a time based solution would be most
> reliable. If the time entry is always being updated by the instance holding 
> the
> lock (even if it's only on an hourly basis) anything more than a couple of
> hours old must be an ophaned one.

Most of the time I run into lock files being an irritation, it's due to 
a crash, and I'll be trying again very shortly thereafter.  If it has to 
wait an hour to be orphaned, that isn't going to do developers any good.

-- 
D. Michael McIntyre

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread Abrolag
On Sun, 26 Jun 2016 11:46:05 -0400
"D. Michael McIntyre"  wrote:

> On 06/26/2016 06:44 AM, Yves Guillemot wrote:
> 
> > If there is only one user on this computer and if the RG files are stored 
> > on a
> > local file system it should be a safe workaround to add in .bash_profile
> > something like:
> > find ~ -name ".~lock.*.rg#" | xargs rm -f  
> 
> I have an ancient laptop at my drum kit that I use to ssh -X into my 
> main box from across the room.  I can have the same .rg file open on the 
> same filesystem on the same computer as the same user.
> 
> When I started this conversation, I could edit the file from either 
> console, and it was tricky to keep up with which changes had been saved 
> where.
> 
> That's the problem lock files were trying to solve, and they succeeded. 
>   Now we have the new problem of how to deal with them when a lock file 
> gets left behind for some reason.
> 
> Deleting lockfiles at login won't suffice.  Deleting lock files at 
> startup would work if the instance starting is the only instance and the 
> filesystem is NOT networked.
> 
> A handy ignore button is probably the most reasonable thing to offer so 
> users can deal with the issue with minimal irritation.  Maybe a smart 
> ignore button that at least checks for likely suspects before presenting 
> itself.  Is this the only instance?  Is this a local only filesystem? 
> Yes and yes?  Show ignore button.
> 
> Thinking on the fly.  Big day today.
> 

I'm steadily more inclined to think a time based solution would be most
reliable. If the time entry is always being updated by the instance holding the
lock (even if it's only on an hourly basis) anything more than a couple of
hours old must be an ophaned one.

The only time I can foresee a problem is if files on a single server are being
access by machines set to wildly different times, but if that was the case I
would expect the users to have a lot of other time based problems!


-- 
W J G

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread Yves Guillemot
Le dimanche 26 juin 2016, 11:46:05 D. Michael McIntyre a écrit :
> On 06/26/2016 06:44 AM, Yves Guillemot wrote:
> > If there is only one user on this computer and if the RG files are stored
> > on a local file system it should be a safe workaround to add in
> > .bash_profile something like:
> > find ~ -name ".~lock.*.rg#" | xargs rm -f
> 
> I have an ancient laptop at my drum kit that I use to ssh -X into my
> main box from across the room.  I can have the same .rg file open on the
> same filesystem on the same computer as the same user.

In such a case there are two users, one on the main computer and one on the 
laptop, even if they share the same user-id (and even if they are the same 
person) and you are right, the lockfile should not be blindly removed at login.

> A handy ignore button is probably the most reasonable thing to offer so
> users can deal with the issue with minimal irritation.  Maybe a smart
> ignore button that at least checks for likely suspects before presenting
> itself.  Is this the only instance?  Is this a local only filesystem?
> Yes and yes?  Show ignore button.
> 

Probably a good solution.

Some times ago I was so bothered by the lockfile while trying to fix a crash 
that I made a bash alias from the above command to be able to quickly clear 
the lock.


Yves


--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread D. Michael McIntyre
On 06/26/2016 06:44 AM, Yves Guillemot wrote:

> If there is only one user on this computer and if the RG files are stored on a
> local file system it should be a safe workaround to add in .bash_profile
> something like:
> find ~ -name ".~lock.*.rg#" | xargs rm -f

I have an ancient laptop at my drum kit that I use to ssh -X into my 
main box from across the room.  I can have the same .rg file open on the 
same filesystem on the same computer as the same user.

When I started this conversation, I could edit the file from either 
console, and it was tricky to keep up with which changes had been saved 
where.

That's the problem lock files were trying to solve, and they succeeded. 
  Now we have the new problem of how to deal with them when a lock file 
gets left behind for some reason.

Deleting lockfiles at login won't suffice.  Deleting lock files at 
startup would work if the instance starting is the only instance and the 
filesystem is NOT networked.

A handy ignore button is probably the most reasonable thing to offer so 
users can deal with the issue with minimal irritation.  Maybe a smart 
ignore button that at least checks for likely suspects before presenting 
itself.  Is this the only instance?  Is this a local only filesystem? 
Yes and yes?  Show ignore button.

Thinking on the fly.  Big day today.

-- 
D. Michael McIntyre

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-26 Thread Yves Guillemot
Le vendredi 24 juin 2016, 13:11:44 Abrolag a écrit :
> If I have to shut down the computer quickly I've been in the habit, of just
> hitting the 'Shutdown' icon on my desktop. This however, leaves a lock in
> place.

Le vendredi 24 juin 2016, 17:46:34 D. Michael McIntyre a écrit :
> On 06/24/2016 12:53 PM, Ted Felix wrote:
> > Might be a good criteria for offering an "ignore" button to clear it
> > 
> > out easily.
> 
> In theory, I feel it defeats the purpose, since it's too easy to ignore
> the situation.  Boy who cried wolf and all that.  Ignore, ignore, oops.
> 

If there is only one user on this computer and if the RG files are stored on a 
local file system it should be a safe workaround to add in .bash_profile 
something like: 
find ~ -name ".~lock.*.rg#" | xargs rm -f

Yves


--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread D. Michael McIntyre
On 06/24/2016 12:53 PM, Ted Felix wrote:

> Might be a good criteria for offering an "ignore" button to clear it
> out easily.

In theory, I feel it defeats the purpose, since it's too easy to ignore 
the situation.  Boy who cried wolf and all that.  Ignore, ignore, oops.

In practice, I've had maybe one legit lock file collision and countless 
illegitimate ones.  The lock files are mildly annoying in the field.

Maybe a button is just too much of an invitation to ignore a legitimate 
collision.  Maybe a --ignore-lockfile command line option?

Just a passing thought.  Tired.

-- 
D. Michael McIntyre

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread Abrolag
On Fri, 24 Jun 2016 12:57:59 -0400
Ted Felix  wrote:

> On 06/24/2016 12:53 PM, Ted Felix wrote:
> > Try doing the same with LibreOffice.  E.g. open a Writer document,
> > then do a shutdown without closing the app.  Do they leave a lock file
> > around?  
> 
>The answer is "yes".  LibreOffice does the same thing.  At least we 
> aren't any worse.
> 
> Ted.

And nowhere near as bad as Firefox :p

However you'll be pleased to know I regard Rosegarden as far more important
than either of those :)


-- 
W J G

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread Abrolag
On Fri, 24 Jun 2016 12:53:30 -0400
Ted Felix  wrote:

> > Also there have been odd occasions where I've got the impression that on a
> > normal close Rosegarden has forgotten to remove the lock file.  
> 
>Need more detail here.  Perhaps if we address the above this might be 
> easier to track down.

Unfortunately I can't be more specific. It's just that I've tried to open files
that I've not used on that session and thought I'm *sure* I closed that.

-- 
W J G

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread Ted Felix
On 06/24/2016 12:53 PM, Ted Felix wrote:
> Try doing the same with LibreOffice.  E.g. open a Writer document,
> then do a shutdown without closing the app.  Do they leave a lock file
> around?

   The answer is "yes".  LibreOffice does the same thing.  At least we 
aren't any worse.

Ted.

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


Re: [Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread Ted Felix
On 06/24/2016 08:11 AM, Abrolag wrote:
> If I have to shut down the computer quickly I've been in the habit, of just
> hitting the 'Shutdown' icon on my desktop. This however, leaves a lock in 
> place.

   Try doing the same with LibreOffice.  E.g. open a Writer document, 
then do a shutdown without closing the app.  Do they leave a lock file 
around?  If not, then perhaps we need to add a signal handler (is this 
SIGINT?) to clean up the lock in this case.  Shouldn't be too hard to do.

> Also there have been odd occasions where I've got the impression that on a
> normal close Rosegarden has forgotten to remove the lock file.

   Need more detail here.  Perhaps if we address the above this might be 
easier to track down.

> Looking at the file I see it already includes a time and date field so I'm
> wondering if it might be possible to check this and if it's older than say 12
> hours assume it's stale.

   Might be a good criteria for offering an "ignore" button to clear it 
out easily.

> Maybe this could be tightened up further. If Rosegarden updates it on (say)
> record/play stops and starts, then the timescale could be safely reduced to an
> hour or so.

   Interesting.  This certainly would make me feel better that we aren't 
causing someone trouble.  Even just on the auto-save interval (two 
minutes or something) would be good.

Ted.

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user


[Rosegarden-user] New(ish) lock feature.

2016-06-24 Thread Abrolag
While I appreciate the value of this, I'm having some problems with it.

If I have to shut down the computer quickly I've been in the habit, of just
hitting the 'Shutdown' icon on my desktop. This however, leaves a lock in place.

Also there have been odd occasions where I've got the impression that on a
normal close Rosegarden has forgotten to remove the lock file.

Looking at the file I see it already includes a time and date field so I'm
wondering if it might be possible to check this and if it's older than say 12
hours assume it's stale.

Maybe this could be tightened up further. If Rosegarden updates it on (say)
record/play stops and starts, then the timescale could be safely reduced to an
hour or so.

-- 
W J G

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Rosegarden-user mailing list
Rosegarden-user@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user