3 * showfile.c -- invoke the `lproc' command
7 * This code is Copyright (c) 2002, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
16 showfile (char **arg, char *file)
22 context_save(); /* save the context file */
26 * If you have your lproc listed as "mhl",
27 * then really invoked the mhlproc instead
28 * (which is usually mhl anyway).
30 if (!strcmp (r1bindex (lproc, '/'), "mhl"))
33 switch (pid = vfork()) {
36 advise ("fork", "unable to");
42 vec[vecp++] = r1bindex (lproc, '/');
52 if (!strcmp (vec[0], "show"))
53 vec[vecp++] = "-file";
59 fprintf (stderr, "unable to exec ");
65 return (pidwait (pid, -1) & 0377 ? 1 : 0);
68 return 1; /* NOT REACHED */