aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-14 23:21:25 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-14 23:21:25 +0200
commit1171342a0c326f464b46a0e2ae9d0f215fa014fa (patch)
tree55f181b945c3bcbbc439bee82b4e5d0d887729b6
parent2c53551735e4e9dc4b6ea664d3bfcd2a9dc479c5 (diff)
downloadrtty-1171342a0c326f464b46a0e2ae9d0f215fa014fa.tar.gz
Use -oBatchMode=yes for ssh
-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);