aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2002-07-23 15:05:00 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2002-07-23 15:05:00 +0000
commit9de7305e58b975252092081c3b4095df032a2b50 (patch)
tree4e259b0ff912d02e73edc5d4205d38b1da0e25df /bin
parentdd4ac026f73cb7fadea8dc4bb2d8e05d88304f6a (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/trap.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index 810070a528d7..2ea182cf27d3 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
#include "error.h"
#include "trap.h"
#include "mystring.h"
+#include "myhistedit.h"
/*
@@ -246,6 +247,12 @@ setsignal(int signo)
action = S_IGN;
break;
#endif
+#ifndef NO_HISTORY
+ case SIGWINCH:
+ if (rootshell && iflag && el != NULL)
+ action = S_CATCH;
+ break;
+#endif
}
}
@@ -359,6 +366,11 @@ onsig(int signo)
! trap[signo][0] == '\0' &&
! (trap[signo][0] == ':' && trap[signo][1] == '\0'))
breakwaitcmd = 1;
+
+#ifndef NO_HISTORY
+ if (signo == SIGWINCH)
+ el_resize(el);
+#endif
}
@@ -414,6 +426,9 @@ setinteractive(int on)
setsignal(SIGINT);
setsignal(SIGQUIT);
setsignal(SIGTERM);
+#ifndef NO_HISTORY
+ setsignal(SIGWINCH);
+#endif
is_interactive = on;
}