title: Is it safe to use fgets() as non-blocking call in C?
body: <p>From this <a href="https://stackoverflow.com/questions/149860/how-to-prevent-fgets-blocks-when-file-stream-has-no-new-data">post</a> it sounds like <code>fgets()</code> is meant to be a blocking call, however, <a href="http://www.mkssoftware.com/docs/man3/fgets.3.asp" rel="nofollow noreferrer">this</a> man page shows that if set as non-blocking, it will return <code>NULL</code> and <code>errno</code> would be <code>EWOULDBLOCK</code> if no data is ready to be read, so my assumption is that it is indeed possible to use it as non-blocking.</p>
  
  <p>I'm aware of <code>select()</code>and friends, I'd just like to know if it's safe to use it as non-blocking? and if it's not, what are those reasons?‎</p>