home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 33,327 of 33,346   
   James K. Lowden to troplin@bluewin.ch   
   Re: Make std::cout accept std::wstring ?   
   10 May 14 06:09:09   
   
   l-september.org> 527634f8   
   From: jklowden@speakeasy.net   
      
   On Fri,  9 May 2014 15:54:54 -0700 (PDT)   
   Tobias Müller  wrote:   
      
   >>> Can you please explain what is the EOF ambiguity of read(2)?   
   >>   
   >> When read(2) returns zero bytes, it may mean that no data   
   >> were pending on a socket with nonblocking I/O, or EOF.   
   ....   
   > AFAIK read/recv only return 0 on EOF. If no data is pending for   
   > nonblocking IO, it returns -1 with errno set to EWOULDBLOCK or EAGAIN.   
      
   My mistake, thank you for the correction.  I was thinking of fread(3),   
   not the same thing at all, and having nothing to do with nonblocking   
   I/O, and somehow had convinced myself that read(2) shared the same   
   ambiguity.   
      
   --jkl   
      
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca