diff options
author | Marcus Arendt <[email protected]> | 2014-11-05 15:34:37 +0100 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2014-11-05 15:34:37 +0100 |
commit | 39cd804e0a04cad11daabcc671ea71594e96f47b (patch) | |
tree | ca62a0934eba72cf6ab17e50905f5c695b0c7852 /erts/etc | |
parent | 0d18bf3268379df2b91e165a835426db77f015e3 (diff) | |
parent | 682a6082159568f40615f03d12d44ee70edd14c6 (diff) | |
download | otp-39cd804e0a04cad11daabcc671ea71594e96f47b.tar.gz otp-39cd804e0a04cad11daabcc671ea71594e96f47b.tar.bz2 otp-39cd804e0a04cad11daabcc671ea71594e96f47b.zip |
Merge branch 'maint'
Conflicts:
erts/vsn.mk
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/common/run_erl_common.c | 8 | ||||
-rw-r--r-- | erts/etc/common/run_erl_common.h | 2 | ||||
-rw-r--r-- | erts/etc/ose/run_erl.c | 2 | ||||
-rw-r--r-- | erts/etc/unix/run_erl.c | 2 |
4 files changed, 9 insertions, 5 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 diff --git a/erts/etc/common/run_erl_common.h b/erts/etc/common/run_erl_common.h index c47a0db054..14207ee4de 100644 --- a/erts/etc/common/run_erl_common.h +++ b/erts/etc/common/run_erl_common.h @@ -40,7 +40,7 @@ void erts_run_erl_log_error(int priority, int line, const char *format,...); int erts_run_erl_open_fifo(char *pipename,char *w_pipename,char *r_pipename); int erts_run_erl_log_alive_minutes(void); -int erts_run_erl_extract_ctrl_seq(char* buf, int len); +int erts_run_erl_extract_ctrl_seq(char* buf, int len, int mfd); /* File operations */ ssize_t sf_read(int fd, void *buffer, size_t len); diff --git a/erts/etc/ose/run_erl.c b/erts/etc/ose/run_erl.c index 6bb59b7f7e..8bc49a485e 100644 --- a/erts/etc/ose/run_erl.c +++ b/erts/etc/ose/run_erl.c @@ -495,7 +495,7 @@ int pass_on(ProgramState *s) { #ifdef DEBUG erts_run_erl_log_status("Pty master write; "); #endif - len = erts_run_erl_extract_ctrl_seq(buffer,len); + len = erts_run_erl_extract_ctrl_seq(buffer,len, s->ofd); if (len > 0) { int wlen = erts_run_erl_write_all(s->ofd, buffer, len); diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index 4b123b8911..049e83f9e4 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -490,7 +490,7 @@ static void pass_on(pid_t childpid) #ifdef DEBUG erts_run_erl_log_status("Pty master write; "); #endif - len = erts_run_erl_extract_ctrl_seq(buf, len); + len = erts_run_erl_extract_ctrl_seq(buf, len, mfd); if(len==1 && buf[0] == '\003') { kill(childpid,SIGINT); |