Clean up process wait to use POSIX waitpid() interface.
[mmh] / uip / mhbuild.c
index 3432ccc..06a353a 100644 (file)
 # endif
 #endif
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define CHECKSW  0
        { "check", 0 },
@@ -1058,8 +1054,14 @@ use_forw:
                struct msgs *mp;
 
                if (ci->ci_magic) {
+                       int i;
+
                        ap = brkstring(ci->ci_magic, " ", "\n");
-                       copyip(ap, arguments, MAXARGS);
+                       for (i=0; ap[i] && i<MAXARGS-1; i++) {
+                               arguments[i] = ap[i];
+                       }
+                       arguments[i] = NULL;
+
                } else {
                        arguments[0] = seq_cur;
                        arguments[1] = NULL;