Subject: Re: kern/29750: send/sendto/sendmsg don't block when no buffer space is available
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: netbsd-bugs
Date: 03/20/2005 22:32:01
The following reply was made to PR kern/29750; it has been noted by GNATS.

From: manu@netbsd.org (Emmanuel Dreyfus)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/29750: send/sendto/sendmsg don't block when no buffer space is available
Date: Sun, 20 Mar 2005 23:31:43 +0100

 The probler is larger: poll() is not able to block until data is ready
 
 i.e: Adding this before sendto() will not make it work.
 
         struct pollfd pfd;
 
         pfd.fd = sd;
         pfd.events = POLLOUT;
         
         if (poll(&pfd, 1, INFTIM) == -1)
                 err(1, "poll");
         if ((pfd.revents & POLLOUT) == 0)
                 warnx("poll returned %x", pfd.revents);
 
 
 -- 
 Emmanuel Dreyfus
 Le cahier de l'admin BSD 2eme ed. est dans toutes les bonnes librairies
 http://www.eyrolles.com/Informatique/Livre/9782212114638/livre-bsd.php
 manu@netbsd.org