Skip to content
  • Sergei Trofimovich's avatar
    Raise exceptions when blocked in bad FDs (fixes Trac #4934) · 9fd507e5
    Sergei Trofimovich authored and Simon Marlow's avatar Simon Marlow committed
    
    
    Before the patch any call to 'select()' with 'bad_fd' led to:
    - unblocking of all threads
    - hiding exception for 'threadWaitRead bad_fd'
    
    The patch fixes both cases in this way:
    after 'select()' failure we iterate over each blocked descriptor
    and poll individually to see it's actual status, which is:
    - READY (move to run queue)
    - BLOCKED (leave in blocked queue)
    - INVALID (send an IOErrror exception)
    
    Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
    9fd507e5