Hi I'm a developer for XBMC for Linux and we use LIRC but we have a bit of trouble with standby and LIRC.
We use the standard socket procedure with a nonblocking socket. The main problem for us is that we have no way of knowing if we lost connection to lirc, no IO error when we enter a standby. I suspect we might not loose connection but lirc doesn't seem to recognize us as it doesn't send anything on the socket. To fix this we reinitialize, which works. The problem is to recognize when we need to do this because lirc exhibit the same behavior if a user have gone into a sleep-wake cycle or if they've unplugged the hardware.

User A
no button press errno 11, and recv -1
Button press gives returns >= 0 errno = 0
-sleep-
no button press errno gives 0, recv 0.
button press errno gives 0, recv 0.

User B (has no remote at all)
errno gives 0, recv 0.

I feel it's bad design to disable lirc after X failed reinitializes (so User B doesn't go into reinitialize over and over again) mainly because hotpluggable wouldn't be possible?

So what I'm asking is: Is there any small ping packet or connect packet XBMC always could send so User A never gets into trouble?

We run this on Ubuntu, same behavior on hardy and gutsy

sincerely Topfs2