2 ** refile.c -- call the "fileproc" to refile the
3 ** -- msg or draft into another folder
5 ** This code is Copyright (c) 2002, by the authors of nmh. See the
6 ** COPYRIGHT file in the root directory of the nmh distribution for
7 ** complete copyright information.
14 refile(char **arg, char *file)
21 vec[vecp++] = mhbasename(fileproc);
22 vec[vecp++] = "-nolink"; /* override bad .mh_profile defaults */
23 vec[vecp++] = "-nopreserve";
24 vec[vecp++] = "-file";
33 context_save(); /* save the context file */
36 switch (pid = vfork()) {
38 advise("fork", "unable to");
42 execvp(fileproc, vec);
43 fprintf(stderr, "unable to exec ");
48 return (pidwait(pid, -1));