open(filePath, O_RDONLY) not blocking?
I'm trying to block on a character device file until it becomes available. The kernel side appears to be working but in my process I call open(filePath, O_RDONLY) and it returns -1.
I though the open command should block until the file is available.
I tried polling the file with the open command and that works but uses to much cpu.
Anyone encountered this problem? Any suggestions? I was thinking I could block on a read, does anyone know how to make reads available on the kernel side?
Linux kernel 18.104.22.168.