virtio: console: Send SIGIO to processes that request it for host events
authorAmit Shah <amit.shah@redhat.com>
Thu, 2 Sep 2010 13:17:52 +0000 (18:47 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Oct 2010 07:14:03 +0000 (17:44 +1030)
commit3eae0adea949d8fdd8fa3e5301192901219d2c64
tree4b37348c448a77e1b6670e67e571a8eda4da9d8d
parente062013c7d22e40ee634b818d28fd615db36998e
virtio: console: Send SIGIO to processes that request it for host events

A process can request for SIGIO on host connect / disconnect events
using the O_ASYNC file flag using fcntl().

If that's requested, and if the guest-side connection for the port is
open, any host-side open/close events for that port will raise a SIGIO.
The process can then use poll() within the signal handler to find out
which port triggered the signal.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c