I have a problem at present when calling read() like this:
unsigned char byData[1024] = {0};
ssize_t len = read(fd, byData, sizeof(byData));
where fd is the file descriptor.
read() is blocking which is not what I want. Is there a simple way to set read to non-blocking or time out? The code is used with inotify.
Thanks for any help.