3 * refile.c -- call the "fileproc" to refile the
4 * -- msg or draft into another folder
6 * This code is Copyright (c) 2002, by the authors of nmh. See the
7 * COPYRIGHT file in the root directory of the nmh distribution for
8 * complete copyright information.
15 refile (char **arg, char *file)
22 vec[vecp++] = r1bindex (fileproc, '/');
23 vec[vecp++] = "-nolink"; /* override bad .mh_profile defaults */
24 vec[vecp++] = "-nopreserve";
25 vec[vecp++] = "-file";
34 context_save(); /* save the context file */
37 switch (pid = vfork()) {
39 advise ("fork", "unable to");
43 execvp (fileproc, vec);
44 fprintf (stderr, "unable to exec ");
49 return (pidwait (pid, -1));