]> diplodocus.org Git - nmh/blobdiff - sbr/m_popen.c
showfile.c: Move interface to own file.
[nmh] / sbr / m_popen.c
index 8a3bae647db96cc9ab2d09837dfc2fac913c8174..ac36e6ba5877e9d45e6ec37fdaa9b7e23a75cbf7 100644 (file)
@@ -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 <h/mh.h>
-#include <h/signals.h>
+#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]);