Date: 4 Jan 2016 10:17:47 +0000 From: "Mark Delany" <c2h@romeo.emu.st> To: freebsd-net@freebsd.org Subject: Re: Does FreeBSD have sendmmsg or recvmmsg system calls? Message-ID: <20160104101747.58347.qmail@f5-external.bushwire.net> In-Reply-To: <20160104093859.GV3625@kib.kiev.ua> References: <alpine.BSF.2.20.1601031833130.84701@localhost.my.domain> <1451841004.10139.34.camel@me.com> <alpine.BSF.2.20.1601031744040.20884@fledge.watson.org> <CAJ-Vmomxcn%2BiYJAzNViL8WnepsCihrkTuHd8=0O6vONKsTExCA@mail.gmail.com> <20160103214720.72014.qmail@f5-external.bushwire.net> <20160104085415.GS3625@kib.kiev.ua> <20160104091108.50654.qmail@f5-external.bushwire.net> <20160104093859.GV3625@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> Why is a signal lost in the scenario you described ? Because the return can only indicate a signal/error *or* a batch of messages but not both and the semantics of recvmsg() means that both could occur. Don't just consider signals, consider any -1/errno return from recvmsg() such as -1/EAGAIN or -1/ENOBUFS or -1/EFAULT. If one emulates recvmmsg() via multiple calls to recvmsg() and the emulation receives 'n' messages via recvmsg() then gets a -1/EFAULT return on message 'n'+1 then what does it return to the caller? If it returns 'n' messages then the EFAULT is lost. If it returns -1/EFAULT then the 'n' messages are lost. Mark.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160104101747.58347.qmail>