X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/eaf54b62d94b8a2ab4a82ed30ab3c08214f51571..8699f1cc:/sbr/m_popen.c?ds=sidebyside diff --git a/sbr/m_popen.c b/sbr/m_popen.c index 8a3bae64..9a1c1a5e 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 @@ -10,6 +8,7 @@ #include #include +#include "m_popen.h" static int m_pid = NOTOK; /* Process we're waiting for */ static int sd = NOTOK; /* Original standard output */ @@ -48,7 +47,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]);