> On 2017/08/10 17:35, ed mcmurray <emcmur...@aevee.com> wrote:
> > From within the MPD application, I would like to access a Linux Named Pipe
> > FIFO that has been created in a second application.  The second application
> > would  place a STOP command into the Name Pipe, when appropriate.  I would
> > like to insert code in MPD to then monitor this Named Pipe for the STOP
> > command and act on the command as though it was sent from an mpd
> > client.
> 
> But ... why?
> 
> You can already do that with sockets, which is the core idea of MPD.
> Why pipes?  Pipes have serious disadvantages (such as being
> unidirectional), but you did not describe any advantages of using them
> instead of sockets.

The overhead of unix sockets during setup (you need socket()+bind()
system calls, against open() in case of a FIFO) is little compared
to the overhead of using them, as in order to successfully write()
to a fifo, the read() must complete.
Unix sockets, as any other sockets, will buffer in kernel.

I agree that unix sockets are superior to fifo's in this matter.

Kind regards,
Kurt
_______________________________________________
mpd-devel mailing list
mpd-devel@musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to