]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
Modified test-mhmail probe.
[nmh] / uip / mhlsbr.c
index 95f8c54d03d3c4bf83e012f1f2dc154e64a9fb38..4f12b6d61b830b3ebb04fa0727a769643b66de61 100644 (file)
@@ -1648,6 +1648,8 @@ static void
 m_popen (char *name)
 {
     int pd[2];
+    char *file;
+    char **arglist;
 
     if (mhl_action && (sd = dup (fileno (stdout))) == NOTOK)
        adios ("standard output", "unable to dup()");
@@ -1655,7 +1657,7 @@ m_popen (char *name)
     if (pipe (pd) == NOTOK)
        adios ("pipe", "unable to");
 
-    switch (m_pid = vfork()) {
+    switch (m_pid = fork()) {
        case NOTOK: 
            adios ("fork", "unable to");
 
@@ -1668,7 +1670,8 @@ m_popen (char *name)
                dup2 (pd[0], fileno (stdin));
                close (pd[0]);
            }
-           execlp (name, r1bindex (name, '/'), NULL);
+           arglist = argsplit(name, &file, NULL);
+           execvp (file, arglist);
            fprintf (stderr, "unable to exec ");
            perror (name);
            _exit (-1);