[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
passfd on glibc
From: |
Bruno Haible |
Subject: |
passfd on glibc |
Date: |
Sun, 13 Mar 2011 23:40:59 +0100 |
User-agent: |
KMail/1.9.9 |
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 <address@hidden>
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>
- [PATCH 1/4] Add AF_UNIX test of socket familly, (continued)
- [PATCH 2/4] sendfd, recvf pass file descriptors along Unix domain sockets, Bastien ROUCARIES, 2011/03/07
- [PATCH 4/4] Add test for passfd, Bastien ROUCARIES, 2011/03/07
- passfd on glibc,
Bruno Haible <=
- passfd on OpenBSD, Bruno Haible, 2011/03/13
- passfd on FreeBSD, Bruno Haible, 2011/03/13
- passfd on AIX 5.2, Bruno Haible, 2011/03/13
- passfd on Solaris, Bruno Haible, 2011/03/13
- passfd on more platforms, Bruno Haible, 2011/03/13
- Re: passfd on more platforms, Eric Blake, 2011/03/14