On Mon, Nov 25, 2013 at 11:50 AM, Kornel Benko <kor...@lyx.org> wrote:

>  Am Montag, 25. November 2013 um 08:22:27, schrieb Vincent van Ravesteijn
> <v...@lyx.org>
>
> > On Tue, Nov 19, 2013 at 9:55 PM, Kornel Benko <kor...@lyx.org> wrote:
>
> >
>
> > > Am Dienstag, 19. November 2013 um 21:06:21, schrieb Georg Baum <
>
> > > georg.b...@post.rwth-aachen.de>
>
> > > > Kornel Benko wrote:
>
> > > >
>
> > > > > Trying to lock with
>
> > > > > open(lock_file.c_str(), O_CREAT|O_EXCL|O_SYNC|O_RDWR, 0666);
>
> > > > > seams to work here. So no fcntl anymore.
>
> > > >
>
> > > > This is not portable either.
>
> > > >
>
> > >
>
> > > I know. Scott and I are testing with lockf() now.
>
> > >
>
> > > > Georg
>
> > >
>
> > > Kornel
>
> >
>
> >
>
> > Why did you commit this non-portable code anyway ?
>
>
>
> 1.) Because we need it for parallel tests.
>
> 2.) What is non-portable? Everything in src/support/filetools.cpp is
> guarded by some #ifdef.
>
> Also this code.
>
> If the needed function lockf() is not available, nothing happens.
>
>
>
> > Vincent
>
>
>
> Kornel
>

The problem is that the commit is touching very essential code. If
something goes wrong LyX becomes pretty much unusable (e.g. if configure
isn't run anymore). We can never be sure that there is no platform out
there which causes this code to fail. I'm also not sure whether the code is
fixing a bug, or facilitating some tests ?

IMO, the fact that the code is between #ifdef's doesn't make it portable.

Vincent

Reply via email to