On 2008-11-19, Marc Hartstein <[EMAIL PROTECTED]> wrote: > A drop-in replacement for statusd_mpd.lua which uses sockets instead of > popen to communicate with mpd. Suggest renaming to replace the other > script.
I suggest sending it to the scripts repository for easy availability. Also, on a cursory glance, it appeared to be a timer hack. If it's at all possible to get the file descriptor from Lua, I suggest adding it to those selected on for event-based processing. This will require a little bit of C code to add the desciptor, since popen_bgread is currently the only interface and unlikely to work correctly on sockets. While to ion3plus, certainly new interfaces could be added to support selecting on arbitrary fds from the Lua side (and the primary reason the support isn't there, is that fds are not well available from Lua), this can be done with e.g. the TCC/alien/c/invoke hacks disgussed e.g. at http://www.mail-archive.com/[email protected]/msg02559.html -- In 1995, Linux was almost a bicycle; an alternative way of live to the Windows petrol beasts that had to be taken to the dealer for service. In 2008, Linux has bloated into a gas-guzzler, and cycle paths have been replaced with polluted motorways.
