Skip to content

Commit

Permalink
virtio: console: Send SIGIO in case of port unplug
Browse files Browse the repository at this point in the history
If a port has registered for SIGIO signals, let the application
know that the port is getting unplugged.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Amit Shah authored and Rusty Russell committed Oct 21, 2010
1 parent 55f6bcc commit a461e11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a461e11

Please sign in to comment.