Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97815
b: refs/heads/master
c: 81c6ce9
h: refs/heads/master
i:
  97813: e1a728d
  97811: 0a9347f
  97807: 74aaf57
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jun 6, 2008
1 parent 5b1cf88 commit 8975786
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dfcceb26f89da86ec4ac9583c4515504af8c6c84
refs/heads/master: 81c6ce9bd3ed3a88caeb9ed97d874450d53339dc
13 changes: 8 additions & 5 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,19 +909,22 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines)

if (vc->vc_tty) {
struct winsize ws, *cws = &vc->vc_tty->winsize;
unsigned long flags;
struct pid *pgrp = NULL;

memset(&ws, 0, sizeof(ws));
ws.ws_row = vc->vc_rows;
ws.ws_col = vc->vc_cols;
ws.ws_ypixel = vc->vc_scan_lines;

mutex_lock(&vc->vc_tty->termios_mutex);
spin_lock_irqsave(&vc->vc_tty->ctrl_lock, flags);
if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) &&
vc->vc_tty->pgrp)
spin_lock_irq(&vc->vc_tty->ctrl_lock);
if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col))
pgrp = get_pid(vc->vc_tty->pgrp);
spin_unlock_irq(&vc->vc_tty->ctrl_lock);
if (pgrp) {
kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1);
spin_unlock_irqrestore(&vc->vc_tty->ctrl_lock, flags);
put_pid(pgrp);
}
*cws = ws;
mutex_unlock(&vc->vc_tty->termios_mutex);
}
Expand Down

0 comments on commit 8975786

Please sign in to comment.