After the passfd source code is written and polished and has a unit test, now comes testing on various platforms.
The first one is a glibc system. I get these warnings: test-passfd.c: In function ‘main’: test-passfd.c:81: warning: implicit declaration of function ‘waitpid’ test-passfd.c:103: warning: value computed is not used This fixes it: 2011-03-13 Bruno Haible <br...@clisp.org> passfd test: Fix warnings. * tests/test-passfd.c: Include <sys/wait.h>. (main): Fix typo. --- tests/test-passfd.c.orig Sun Mar 13 23:34:20 2011 +++ tests/test-passfd.c Sun Mar 13 20:36:56 2011 @@ -25,6 +25,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <sys/stat.h> +#include <sys/wait.h> #include "macros.h" @@ -86,8 +87,7 @@ } ASSERT (ret == pid); - ret = WIFEXITED (status); - if (ret == 0) + if (!WIFEXITED (status)) { fprintf (stderr, "Child does not normally exit\n"); return 65; @@ -100,8 +100,8 @@ } /* try to stat new fd */ - ret == fstat (fd, &st); - if (0 != ret) + ret = fstat (fd, &st); + if (ret < 0) { perror ("fstat"); return 80; -- In memoriam Odette Sansom <http://en.wikipedia.org/wiki/Odette_Hallowes>