2 ** showfile.c -- invoke the `lproc' command
4 ** This code is Copyright (c) 2002, by the authors of nmh. See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
13 showfile(char **arg, char *file)
19 context_save(); /* save the context file */
23 ** If you have your lproc listed as "mhl",
24 ** then really invoked the mhlproc instead
25 ** (which is usually mhl anyway).
27 if (!strcmp(mhbasename(lproc), "mhl"))
30 switch (pid = vfork()) {
33 advise("fork", "unable to");
39 vec[vecp++] = mhbasename(lproc);
49 if (!strcmp(vec[0], "show"))
50 vec[vecp++] = "-file";
56 fprintf(stderr, "unable to exec ");
62 return (pidwait(pid, -1) & 0377 ? 1 : 0);
65 return 1; /* NOT REACHED */