/* fork.c - fork and exec a process, connecting stdin/out w/pipes */
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+#include <ac/unistd.h>
+
#include "slap.h"
+#include "shell.h"
+int
forkandexec(
char **args,
FILE **rfp,