On Monday 29 September 2008, Peter Hutterer wrote:
> On Sun, Sep 28, 2008 at 03:11:46PM +0100, Magnus Kessler wrote:
> > Testing status against EEXIST is wrong and we should check errno
> > instead if we want to allow the use of an existing file. However, since
> > we pass a file name that in principle could be any existing file (not
> > just fifos) is there any guarantee that we can later actually use the
> > fifo?
>
> Thanks. There is no guarantee that we can use it, but at the same time
> the use-case where the pipe already exists is common.
> In the simple case of a server restart, the first mkfifo command succeeds
> but the second fails with EEXIST. So the pipe is still there and should
> be used. Admittedly, it might be a good idea to clean up after ourselves
> and delete the fifo if we have created it in the first place. What about
> the (compile-tested) code below?
>
> Cheers,
>   Peter
>

[patch snipped]

Hi Peter,

your patch would certainly work and prevent fifos created by the driver hang 
around if and when the X server terminated normally. Crashes would still 
lead to the current situation. I'm also slightly nervous about adding yet 
more code to functionality that is effectively never used in normal 
operations. New proposal to follow...

Cheers,

Magnus

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to