From 1171342a0c326f464b46a0e2ae9d0f215fa014fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 14 Jul 2021 23:21:25 +0200 Subject: Use -oBatchMode=yes for ssh --- rtty.c | 7 ++++--- 1 file 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); -- cgit v1.2.3