From: Amit Shah Date: Thu, 2 Sep 2010 13:17:54 +0000 (+0530) Subject: virtio: console: Send SIGIO in case of port unplug X-Git-Tag: v2.6.37-rc1~219^2~2 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=a461e11e7b8ca2705889bcf9582f6a8f84884bd2;p=net-next-2.6.git virtio: console: Send SIGIO in case of port unplug If a port has registered for SIGIO signals, let the application know that the port is getting unplugged. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell --- diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 6d5c579b169..dc42d568948 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1259,6 +1259,9 @@ static void unplug_port(struct port *port) port->guest_connected = false; port->host_connected = false; wake_up_interruptible(&port->waitqueue); + + /* Let the app know the port is going down. */ + send_sigio_to_port(port); } if (is_console_port(port)) {