> strangely, there isn't, but instead a return code of -1 means poll()
> throwing an error – namely "Interrupted system call" (errno=4).

This can happen if, for example, some other portion of your code uses 
alarm(3) (or something similar), i.e. some other signal was received by 
your process which interrupted the poll(2) call.  So to progress on your 
task, maybe you can install signal handlers for the various signals; each 
signal handler could set a bit in some bitset indicating which signal was 
received.  Thus any time you get an errno of EINTR, you can check that 
bitset to see which signal interrupted your system call.

Hope this helps,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   The reasonable man adapts himself to the world: the unreasonable
   man persists in trying to adapt the world to himself.  Therefore
   all progress depends on the unreasonable man.

        -George Bernard Shaw

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to