diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2012-09-10 01:25:31 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2012-09-10 01:25:31 +0000 |
commit | eb744d9d40f02414d35437f9ef397b127027955b (patch) | |
tree | 4209cb2a75d870442934e487ebc85648da2e4d74 /bin/ksh | |
parent | 9768434a12db19b3733b0e34f316aa790d5adaf7 (diff) |
fake a sigwinch after each job, so if the terminal changes size,
we'll notice and update
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/edit.c | 4 | ||||
-rw-r--r-- | bin/ksh/main.c | 3 | ||||
-rw-r--r-- | bin/ksh/sh.h | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index 6c357a7de5c..ec72d546c18 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.34 2010/05/20 01:13:07 fgsch Exp $ */ +/* $OpenBSD: edit.c,v 1.35 2012/09/10 01:25:30 tedu Exp $ */ /* * Command line editing - common code @@ -20,7 +20,7 @@ static void x_sigwinch(int); -static volatile sig_atomic_t got_sigwinch; +volatile sig_atomic_t got_sigwinch; static void check_sigwinch(void); static int x_file_glob(int, const char *, int, char ***); diff --git a/bin/ksh/main.c b/bin/ksh/main.c index 1f232a366e7..e4a6f0e7202 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.50 2012/09/06 18:04:34 millert Exp $ */ +/* $OpenBSD: main.c,v 1.51 2012/09/10 01:25:30 tedu Exp $ */ /* * startup, main loop, environments and error handling @@ -565,6 +565,7 @@ shell(Source *volatile s, volatile int toplevel) } if (interactive) { + got_sigwinch = 1; j_notify(); mcheck(); set_prompt(PS1, s); diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h index e4e8807471e..17462049618 100644 --- a/bin/ksh/sh.h +++ b/bin/ksh/sh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sh.h,v 1.30 2010/01/04 18:07:11 deraadt Exp $ */ +/* $OpenBSD: sh.h,v 1.31 2012/09/10 01:25:30 tedu Exp $ */ /* * Public Domain Bourne/Korn shell @@ -287,6 +287,7 @@ typedef struct trap { EXTERN volatile sig_atomic_t trap; /* traps pending? */ EXTERN volatile sig_atomic_t intrsig; /* pending trap interrupts command */ EXTERN volatile sig_atomic_t fatal_trap;/* received a fatal signal */ +extern volatile sig_atomic_t got_sigwinch; extern Trap sigtraps[NSIG+1]; /* |