|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Henning Brauer (lists-openbsdtech
bsws.de)
Date: Sun Mar 18 2007 - 14:05:45 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* Valentin Kozamernik <tin
komna.com> [2007-03-18 16:25]:
> While reading through ntpd and bgpd sources I came across a piece of
> code I don't fully understand.
>
> The imsg_read() function uses read(2) and returns 0 on EOF, EINTR or
> EAGAIN. But whereever imsg_read() is used it is assumed that the
> return value of 0 means that the socket has been closed.
imsg_read actually uses recvmsg(2), but that doesn't really make a
difference.
you are correct insofar that the return(0) there is incorrect.
after looking at things a bit I believe we get away with returning -2
in that case, but I'll look a bit closer before actually changing that.
a very good catch!
--
Henning Brauer, hb
bsws.de, henning
openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]