About the slowness and batterylife: None of this has happened on my Glo, maybe there is something specific about the Touch that I missed? Please try to pinpoint when the battery drains so quickly, is it during reading, sleeping (or (!) power off)? There's also an uninstaller if you want to compare easily, see the first post.
Quote:
Originally Posted by Lucas Malor
Anyway, what does exaclt this piece of code?
|
I create a named pipe (/tmp/screenInvert) to be able to control the state. For this I launch a new thread which opens the pipe and waits for data to arrive. It waits using epoll_wait(), so the thread is only awakened by the kernel when someone writes to the pipe (i.e. you press toggle). After the read is completed, I need to reopen the pipe.