#include "md_p.h"
#include <sys/socket.h>
#include <sys/utsname.h>
+#include <sys/wait.h>
#include <sys/un.h>
#include <ctype.h>
#include <dirent.h>
{
int i;
int len;
+ pid_t pid;
+ int status;
char pathbuf[1024];
char *paths[4] = {
pathbuf,
case -1: fprintf(stderr, Name ": cannot run mdmon. "
"Array remains readonly\n");
return -1;
- default: ; /* parent - good */
+ default: /* parent - good */
+ pid = wait(&status);
+ if (pid < 0 || status != 0)
+ return -1;
}
return 0;
}