Stefan Bellon sbellon at
Fri Aug 13 13:08:26 PDT 2004

John Tytgat wrote:
> In message <411C84BE.50306 at>
>           Nick Burrett <nick at> wrote:

> > Within the environmet of pthreads, this could be done.  But I've
> > just realised you said concurrent processes, not threads.  I don't
> > suppose there is any function to lock a file system.  Mind you if
> > there was, then the way applications are written, they'd fail and
> > probably terminate.
> > 
> > I'm not sure.

> I guess if pthread switching is disabled and you make sure no
> callbacks can kick in (running in SVC mode ?), I think you have what
> you want to have.  Any particular usecase where this is wanted ?

In GnuPG a race condition of two concurrent GnuPG processes was
discovered. GnuPG expects rename(a,b) to move a to b even if b exists.
Not that this race condition would matter as I doubt many people use
GnuPG on RISC OS, let alone two processes running at the same time, but
nevertheless, I think rename() should be "fixed" in UnixLib to do what
SUSv3 says.

Stefan Bellon

More information about the gcc mailing list