conflicting command edits from several processes

Bug #783886 reported by Julian Rombach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Undecided
Unassigned

Bug Description

Hi.

This bug is serious, I presume, but not relevant to security.

When several processes of clicompanion are running and they have loaded the same library file at startup, when one process edits a command in the library (not the last one in the list), the succession of the commands is changed. When the second instance edits this very command or one below it, the edit is saved into the already changed list and it affects the wrong command.

Maybe the edit function should, when finally trying to overwrite, include a reload of the library and a comparison to the loaded one by some shell tool and some warning if necessary. Not: relaoading when pressing "edit" because the disturbance by the other process might occur right when the edit template is already opened but the writing still not started.

Revision history for this message
Marek Bardoński (bdfhjk) wrote : Re: [Bug 783886] [NEW] conflicting command edits from several processes

Thanks for report, I look at this.

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

It can be solved 2 ways:

1. better but more work - rewrite edit/add/remove command, that it load stored data before update
2. simpler - create a lock file

However, I think not many people use two instances od Clicompanion and do edits in both at the same time. But still it should be patched.

Revision history for this message
stlsaint (stlsaint) wrote :

As we move forward in development i suggest we knock this one out by option 1. Yes it will be more work but its better for the project down the long run. We dont want to get further into the project and have something like this come back to bite us in the rear! bdfhjk if it is all the same to you i vote for option one and propose the patch to duanedesign.

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

Solved by 1 way.

Changed in clicompanion:
status: New → Fix Committed
Revision history for this message
Duane Hinnen (duanedesign) wrote :

thank you bdfhjk!

David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.