-
-/*
- * m_popen.c -- Interface for a popen() call that redirects the current
+/* m_popen.c -- Interface for a popen() call that redirects the current
* process standard output to the popen()d process.
*
* This code is Copyright (c) 2014, by the authors of nmh. See the
#include <h/mh.h>
#include <h/signals.h>
+#include "m_popen.h"
static int m_pid = NOTOK; /* Process we're waiting for */
static int sd = NOTOK; /* Original standard output */
execvp (file, arglist);
fprintf (stderr, "unable to exec ");
perror (name);
- _exit (-1);
+ _exit(1);
default:
close (pd[0]);