[Top][All Lists]

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

Re: run.c translator

From: Marcus Brinkmann
Subject: Re: run.c translator
Date: Thu, 21 Mar 2002 01:22:11 -0500
User-agent: Mutt/1.3.25i

On Wed, Mar 20, 2002 at 10:05:32PM -0800, Thomas Bushnell, BSG wrote:
> I think it would be clearest to have A open it twice, one for reading,
> and one for writing.

The problem is getting the two matched together without race.
The unique feature in my translator (which distinguishes it from a
normal fifo) is that it starts an instance of the program on each open.
This guarantee allows to use it with multiple users at the same time.

Or maybe it would work to just pair them together based on the user
id(s).  But this would mean that although multiple people could use it
in parallel, a single user couldn't use it several times in parallel.
Very weird behaviour, and not very robust.

> Anyway, if you keep it as it is now (and that has to work for an A
> which opens with O_RDWR anyhow), and you are advertising T as a named
> pipe, then it must look like a named pipe, which is to say, you should
> get something that understands the socket protocol.

I think it maybe should not advertise itself as a FIFO if it isn't
really one.  Roland suggested making it a character device.  (But with
the same semantics otherwise).

> In which case, A can reliably assume that shutdown wil work.

I think using shutdown is the appropriate solution, which can be just
passed through (or if we lose bidirectional pipes, closes one end).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]