[PATCH] xf86-input-synaptics: fix creation of repeater fifo

Magnus Kessler Magnus.Kessler at gmx.net
Thu Oct 2 06:39:37 PDT 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.x.org/archives/xorg/attachments/20081002/4bc7c82b/attachment.pgp>


More information about the xorg mailing list