The g_poll() function returns -1
"on error or if the call was interrupted". (See: https://developer.gnome.org/glib/2.28/glib-The-Main-Event-Loop.html#g-poll).
If g_poll
returns -1
how do I determine if this was because the call was interrupted vs. if there was an error?
If it was an error, how do I determine the cause of the error? Is it sufficient to look at errno
?