Editing POLLHUP polling
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 57: | Line 57: | ||
#include <string.h> | #include <string.h> | ||
short do_test(short events, const char *data) { | |||
/* create a socket pair, one end for parent, one end for child */ | /* create a socket pair, one end for parent, one end for child */ | ||
int sockets[2]; | int sockets[2]; | ||
Line 77: | Line 77: | ||
if(rc < 1) { printf("poll err %i\n", errno); return 1; } | if(rc < 1) { printf("poll err %i\n", errno); return 1; } | ||
printf("do_test events %x data %p: %0x\n", events, data, fd.revents); | printf("do_test events %x data %p: %0x\n", events, data, fd.revents); | ||
} | } | ||