X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/afee8ed17a56617618fb7f963b111d7cf0fb56e7..df6e7ebd567b8c815843682a2739009bac298b33:/uip/post.c diff --git a/uip/post.c b/uip/post.c index 7bed6f8a..69fb74e6 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"); @@ -1338,8 +1338,6 @@ make_bcc_file (int dashstuff) * of MIME encapsulation. */ if (filter != NULL) { - vec[0] = r1bindex (mhlproc, '/'); - for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { @@ -1349,7 +1347,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 +1360,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);