diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-14 23:21:25 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-14 23:21:25 +0200 |
commit | 1171342a0c326f464b46a0e2ae9d0f215fa014fa (patch) | |
tree | 55f181b945c3bcbbc439bee82b4e5d0d887729b6 | |
parent | 2c53551735e4e9dc4b6ea664d3bfcd2a9dc479c5 (diff) | |
download | rtty-1171342a0c326f464b46a0e2ae9d0f215fa014fa.tar.gz |
Use -oBatchMode=yes for ssh
-rw-r--r-- | rtty.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |