aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common/run_erl_common.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-10-30 11:53:03 +0100
committerSverker Eriksson <[email protected]>2014-10-30 14:47:28 +0100
commit5fb392632142f3903e2be91d5ada95fc4474d2ab (patch)
treeca9b3d356d25b67f287f2a937b82ad4e1b614379 /erts/etc/common/run_erl_common.c
parent743ed31108ee555db18d9833186865e85e34333e (diff)
downloadotp-5fb392632142f3903e2be91d5ada95fc4474d2ab.tar.gz
otp-5fb392632142f3903e2be91d5ada95fc4474d2ab.tar.bz2
otp-5fb392632142f3903e2be91d5ada95fc4474d2ab.zip
erts: Mend run_erl to set windows size of terminal sent from to_erl
Need to include sys/ioctl.h for TIOCSWINSZ to be defined. Seems this was broken when refactoring run_erl for OSE in OTP 17.0.
Diffstat (limited to 'erts/etc/common/run_erl_common.c')
-rw-r--r--erts/etc/common/run_erl_common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/etc/common/run_erl_common.c b/erts/etc/common/run_erl_common.c
index 580b6cc3c5..20b78eb05e 100644
--- a/erts/etc/common/run_erl_common.c
+++ b/erts/etc/common/run_erl_common.c
@@ -36,6 +36,10 @@
# include <syslog.h>
#endif
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
#ifdef __OSE__
# include "ramlog.h"
#endif
@@ -637,7 +641,7 @@ int erts_run_erl_open_fifo(char *pipename,char *w_pipename,char *r_pipename) {
/* Extract any control sequences that are ment only for run_erl
* and should not be forwarded to the pty.
*/
-int erts_run_erl_extract_ctrl_seq(char* buf, int len)
+int erts_run_erl_extract_ctrl_seq(char* buf, int len, int mfd)
{
static const char prefix[] = "\033_";
static const char suffix[] = "\033\\";
@@ -662,7 +666,7 @@ int erts_run_erl_extract_ctrl_seq(char* buf, int len)
struct winsize ws;
ws.ws_col = col;
ws.ws_row = row;
- if (ioctl(MFD, TIOCSWINSZ, &ws) < 0) {
+ if (ioctl(mfd, TIOCSWINSZ, &ws) < 0) {
ERRNO_ERR0(LOG_ERR,"Failed to set window size");
}
#endif