Thread (5 messages) 5 messages, 2 authors, 2010-09-06

[PATCH 3/3] virtio: console: Send SIGIO in case of port unplug

flat view
STALE5889d

From: Amit Shah <hidden>
Date: 2010-09-02 13:17:54
Subsystem: char and misc drivers, the rest, virtio console driver · Maintainers: Arnd Bergmann, Greg Kroah-Hartman, Linus Torvalds, Amit Shah

If a port has registered for SIGIO signals, let the application
know that the port is getting unplugged.

Signed-off-by: Amit Shah <redacted>
---
 drivers/char/virtio_console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index a750d2b..f7adfd3 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1244,6 +1244,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)) {
-- 
1.7.2.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help