Is it possible to trigger an event when data is available at a dev node? Very simply, if some widget device sends information over usb to my linux box, would it be possible to trap into some event handler that spawns a process to do something with the data?
Of course I could always have a service running that waits on incoming data, but I was simply curious to see what options were available with this.
Also, if nothing is listening on a dev node, what happens to the data that is written to it externally? Is it buffered? For how long?
My device is a serial converter bridge. It registers itself under
/dev/ttyUSBx. I can read the data as it comes in or write to it from either end without trouble. I guess the type of driver is just a pass through. I was just wondering if I could register some kind of script to be executed or something. Or at the very least some kind of call-back function. Although, at that point I guess I might as well opt to write a background service of my own that does this.