From: Ken Hornstein Date: Sat, 2 Feb 2013 06:10:06 +0000 (-0500) Subject: Convert post over to use new argsplit code. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/352808aa57a14f23c612cb9e9e272a5e996c65e1?ds=sidebyside Convert post over to use new argsplit code. --- diff --git a/uip/post.c b/uip/post.c index 7bed6f8a..59c3fbda 100644 --- a/uip/post.c +++ b/uip/post.c @@ -1284,9 +1284,9 @@ make_bcc_file (int dashstuff) { int fd, i; pid_t child_id; - char *vec[6]; + char **vec; FILE *out; - char *tfile = NULL; + char *tfile = NULL, *program; tfile = m_mktemp2(NULL, "bccs", NULL, &out); if (tfile == NULL) adios("bcc", "unable to create temporary file"); @@ -1349,7 +1349,7 @@ make_bcc_file (int dashstuff) case OK: dup2 (fileno (out), 1); - i = 1; + vec = argsplit(mhlproc, &program, &i); vec[i++] = "-forward"; vec[i++] = "-form"; vec[i++] = filter; @@ -1362,7 +1362,7 @@ make_bcc_file (int dashstuff) vec[i++] = "-nodashstuffing"; vec[i] = NULL; - execvp (mhlproc, vec); + execvp (program, vec); fprintf (stderr, "unable to exec "); perror (mhlproc); _exit (-1);