Current-Users archive

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

Re: Partial reads on unix domain sockets



On Wed 07 Apr 2021 at 13:43:52 +0200, Tom Ivar Helbekkmo wrote:
> While there is no guarantee of a one to one relationship between writes
> and reads, it seems that some applications expect this.  In my case, it
> was jack (pkgsrc/audio/jack) that failed.  It comes with, among other
> things, a daemon, jackd, and a library for use by clients wishing to
> connect to it.  Communication between jackd and its clients became
> impossible with this change, because the code in jack expects to be able
> to exchange C structs between server and clients.  The jackd server has
> a thread that uses poll() to wait for available packets from clients,
> and when something arrives, it is read with code like this example:

Shouldn't code that expects that open a SOCK_SEQPACKET socket instead of
SOCK_STREAM?

(Or SOCK_DGRAM perhaps, since socket(2) seems to say that SOCK_SEQPACKET
doesn't exist for PF_LOCAL)

-Olaf.
-- 
___ Q: "What's an anagram of Banach-Tarski?"  -- Olaf "Rhialto" Seibert
\X/ A: "Banach-Tarski Banach-Tarski."         -- rhialto at falu dot nl

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index