[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian specific gpm brokenness



Hi,

On Thu, Mar 13, 2003 at 04:53:17AM -0800, Ron wrote:

> [1] there appears to be no way of preventing gpm &c from reading back
>     their own writes if the multiplexer doesn't clear the fifo in time,
>     at least not without modifying them to know they are reading from a
>     fifo and spinlocking on writes.  SIGIO _might_ help, but its not
>     supported on fifo's till 2.5.20 or so.  If anyone knows a way to do
>     this outside of kernel space I'd be grateful for a tip on that too.

This is quite ugly. Scheduling reads from the same open file among
processes can only be done if they cooperate and perform some locking on
the resource.

What you need is two pipes on the same ofile. A unix domain socket is
probably to different from a fifo here, but what about a pty? It's
bidirectional, and a character device that supports most standard
IOCTLs.

I.e. have your mouse emulation program allocate a pty, keep the master,
and give the slave side for gpm to play with.

Cheers,


Emile.

-- 
E-Advies - Emile van Bergen           emile@e-advies.nl      
tel. +31 (0)70 3906153           http://www.e-advies.nl    

Attachment: pgpc5KIzLliKL.pgp
Description: PGP signature


Reply to: