]>
diplodocus.org Git - nmh/blob - sbr/refile.c
3 * refile.c -- call the "fileproc" to refile the
4 * -- msg or draft into another folder
8 * This code is Copyright (c) 2002, by the authors of nmh. See the
9 * COPYRIGHT file in the root directory of the nmh distribution for
10 * complete copyright information.
17 refile (char **arg
, char *file
)
24 vec
[vecp
++] = r1bindex (fileproc
, '/');
25 vec
[vecp
++] = "-nolink"; /* override bad .mh_profile defaults */
26 vec
[vecp
++] = "-nopreserve";
27 vec
[vecp
++] = "-file";
36 context_save(); /* save the context file */
39 switch (pid
= vfork()) {
41 advise ("fork", "unable to");
45 execvp (fileproc
, vec
);
46 fprintf (stderr
, "unable to exec ");
51 return (pidwait (pid
, -1));