← Back to team overview

kicad-developers team mailing list archive

Re: Config file relocation (new patch)

 

On Wed, Sep 03, 2014 at 04:33:23PM +0300, Sergey A. Borshch wrote:
>  What's the function of this lock file? Shouldn't it be placed in project
> folder behind the file being edited?

At the beginning it was done that way. No idea on why it changed. vim
could do it in both way by configuration (but there are few things not
configurable in vim...)

>  Another question about ~/eeschema-<user>, ~/pcbnew-<user> and similar
> files. Shouldn't it be placed in ~/.kicad or /var/lock as almost all other
> programs do? If those files are placed not in /var/lock, what's the purpose
> of username in file names if files are created inside that user home
> directory?

IIRC /var/lock is reserved for system processes only; /tmp/eeschema-user
and similar would be better ideas (X has a *dot* lockfile in /tmp, for
example). Of course /tmp is actually the default for $TMPDIR (POSIX and
SuS say so).

Also lockfiles for eeschema and pcbnew are more a nuisance than other...
they only warn you about inability to crossprobe in fact; I personally
ripped out all the locking calls... even for data files it's not actually
needed to lock them since they are read/written and closed (they don't
stay open). However there is the danger of overwriting from concurrent
program calls so the lock is in place to warn you (however I sometime
find useful to open another instance with the 'old' version for
reference...)

-- 
Lorenzo Marcantonio
Logos Srl


References