X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b43e55a89e0fd66e1bf968fed25feacfbd045514..1e03ea3338cc5ccd9ddf4feaaacfeda1998689cc:/sbr/m_popen.c diff --git a/sbr/m_popen.c b/sbr/m_popen.c index 8a3bae64..ac36e6ba 100644 --- a/sbr/m_popen.c +++ b/sbr/m_popen.c @@ -1,6 +1,4 @@ - -/* - * 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 @@ -8,8 +6,11 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "arglist.h" +#include "error.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 */ @@ -48,7 +49,7 @@ m_popen (char *name, int savestdout) execvp (file, arglist); fprintf (stderr, "unable to exec "); perror (name); - _exit (-1); + _exit(1); default: close (pd[0]);