* tests/test-passfd.c: Include <sys/wait.h>.
(main): Fix typo.
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include "macros.h"
}
ASSERT (ret == pid);
- ret = WIFEXITED (status);
- if (ret == 0)
+ if (!WIFEXITED (status))
{
fprintf (stderr, "Child does not normally exit\n");
return 65;
}
/* try to stat new fd */
- ret == fstat (fd, &st);
- if (0 != ret)
+ ret = fstat (fd, &st);
+ if (ret < 0)
{
perror ("fstat");
return 80;