Fix errno check in wait_for_data_from()

The problem was that errno was checked even if system call didn't
failed, in which case it's value is not reset to 0, which could
cause infinite loop (when errno was once set to EINTR, but all
further calls to select() don't  set error and just return value
that is not equal to -1).

Was changed to be like this quite recently.
Merge branch 'fix-bg-process-cancell-waiting'

The problem was that errno was checked even if system call didn't
failed, in which case it's value is not reset to 0, which could
cause infinite loop (when errno was once set to EINTR, but all
further calls to select() don't  set error and just return value
that is not equal to -1).

Was changed to be like this quite recently.