If the tests are forking and the parent process is a client, care must
be taken to handle SIGPIPE reported by the child process (server) when
the client closes the connection.
This hadn't been exposed until commit
dd79ac9bcf90012e090726adf7c1940bcce8333f, thanks to the fact that the
parent process kept the other pipe end which effectively prevented a
"broken pipe".
Signed-off-by: Daiki Ueno <ueno@gnu.org>
success("trying %s\n", msg);
+ signal(SIGPIPE, SIG_IGN);
+
ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
if (ret < 0) {
perror("socketpair");
int ret;
success("testing: %s\n", name);
+
+ signal(SIGPIPE, SIG_IGN);
+
ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
if (ret < 0) {
perror("socketpair");