From 352808aa57a14f23c612cb9e9e272a5e996c65e1 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sat, 2 Feb 2013 01:10:06 -0500 Subject: [PATCH] Convert post over to use new argsplit code. --- uip/post.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.56.0