The unreliability of AF_UNIX datagram sockets

Corinna Vinschen
Mon May 17 10:26:11 GMT 2021

On May 13 10:30, Ken Brown wrote:
> While working on sendmsg, I thought of another useful thing that the mqueue
> code could provide: an internal _mq_send function that returns EPIPE if no
> one has the mqueue open for reading.  This plays the role of the
> STATUS_PIPE_IS_CLOSED macro in the pipe implementation.

I don't see how to do that.  The code is written in a way not requiring
to keep track of stuff at runtime.  All shared info is part of the mmap
so far.  We don't know if any other mqd_t descriptor is open at the time,
it's not even a descriptor in the usual sense, just a pointer to a private
malloc'ed area.  Keeping track of open descriptors requires another
shared mem region at runtime.


More information about the Cygwin-developers mailing list