]> diplodocus.org Git - nmh/blobdiff - sbr/m_popen.c
Fix invalid pointer arithmetic.
[nmh] / sbr / m_popen.c
index 17203de8afa236815e759ae346e2bc5498218431..9a1c1a5e447f83a43715e959d6385f9f4befd3d9 100644 (file)
@@ -8,6 +8,7 @@
 
 #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 */
@@ -46,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]);