Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 select() returns -1 in case of errors, not 0

Develop
accepted
Code (2)
Next_Release
1
1 day ago
2011-03-16
Anonymous
No

I believe line 146 of ttylog.c should be :

  if (retval > 0)

instead of ;
if (retval)

This because under linux "man select" reads "On error, -1 is returned".

On a side note, I also believe that line 137 and 138 of the same file are superfluous, as rfds will be set in the while loop anyway.

Discussion

  • Planed for v0.2.0

     
  • Bug is in the code...

     
  • A return of '0' (zero) is also valid but not an error; so while that line may need to be changed, just changing it to '> -0' may not be enough.

    • milestone: v0.2.0 --> v0.2.1
     
  • This will need more investigation.

     
    • Group: v0.2.0 --> Next_Release
    • Priority: 5 --> 1
    • Milestone: Develop --> v0.26
     
    • status: open --> accepted
    • Milestone: v0.26 --> Develop