View Issue Details

IDProjectCategoryView StatusLast Update
0007020ScribusInternalpublic2008-05-11 17:02
ReporterringercAssigned To 
PrioritynoneSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.3.5svn 
Summary0007020: Protect documents against being opened by two different Scribus instances
DescriptionSee mailing list discussion 2008-04-28 "Multiple instances of Scribus".

A lock file is a BAD idea:

- It's an unnecessary file being created and deleted by Scribus in the same location as the original file. If the user has permission to modify the original file but not make new files in that directory, things will explode.

- If the Scribus instance doing the editing crashes out, and the document is on a network volume, there is no way to safely detect this.

So OS-level mandatory or advisory locking should be used. For example, on win32 open the file in exclusive mode. On linux, see fcntl(), flock(), lockf(), linux/Documentation/mandatory.txt and linux/Documentation/locks.txt .

There are still circumstances under which locking on a network won't work. For example, most fuse file systems won't support file locks, NFS doesn't support mandatory locking unless the `mand' mount option is passed (though it does support advisory locking) and SMB may or may not depending on server options. It's still a whole lot better than a lock file.
TagsNo tags attached.
Patch

Relationships

child of 0007017 acknowledged Metabug: Multiple instance safety / single-instance-per-user support 

Activities

ringerc

2008-05-11 17:02

reporter   ~0019658

Note that locking will also catch cases of files opened multiple times by a single instance with different paths (say, due to bind mounts or directory symlinks).

Issue History

Date Modified Username Field Change
2008-05-11 17:02 ringerc New Issue
2008-05-11 17:02 ringerc Reported by => 2008-04-28 "Multiple instances of Scribus"
2008-05-11 17:02 ringerc Reported where => Mailing List
2008-05-11 17:02 ringerc Relationship added child of 0007017
2008-05-11 17:02 ringerc Note Added: 0019658