aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rtty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/rtty.c b/rtty.c
index 0eb26f8..b5fa5a8 100644
--- a/rtty.c
+++ b/rtty.c
@@ -44,13 +44,14 @@ main(int argc, char *argv[])
dup2(fdout, 1);
/* Create new argument vector. */
- if(!(nargv = malloc(sizeof(char *)*(argc+1))))
+ if(!(nargv = malloc(sizeof(char *)*(argc+2))))
err(1, "malloc");
nargv[0] = "ssh";
nargv[1] = "-tt";
+ nargv[2] = "-oBatchMode=yes";
for(i = 1; i < argc; i++)
- nargv[i+1] = argv[i];
- nargv[argc+1] = NULL;
+ nargv[i+2] = argv[i];
+ nargv[argc+2] = NULL;
/* Exec into ssh. */
execvp("ssh", nargv);