public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] tst-cancel4: Make blocking on write more portable
@ 2020-08-06 23:33 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-08-06 23:33 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b71bc845dd81e7d29958661a086fd6c643a7d268
commit b71bc845dd81e7d29958661a086fd6c643a7d268
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Aug 7 01:13:17 2020 +0200
tst-cancel4: Make blocking on write more portable
* nptl/tst-cancel4.c (tf_send, tf_sendto): Set socket buffer size after
connecting.
Diff:
---
nptl/tst-cancel4.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nptl/tst-cancel4.c b/nptl/tst-cancel4.c
index 5250a30b2e..6a4fb64894 100644
--- a/nptl/tst-cancel4.c
+++ b/nptl/tst-cancel4.c
@@ -753,13 +753,13 @@ tf_send (void *arg)
if (tempfd2 == -1)
FAIL_EXIT1 ("socket (AF_UNIX, SOCK_STREAM, 0): %m");
- set_socket_buffer (tempfd2);
-
if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0)
FAIL_EXIT1 ("connect: %m");
unlink (sun.sun_path);
+ set_socket_buffer (tempfd2);
+
xpthread_barrier_wait (&b2);
if (arg != NULL)
@@ -1288,13 +1288,13 @@ tf_sendto (void *arg)
if (tempfd2 == -1)
FAIL_EXIT1 ("socket (AF_UNIX, SOCK_STREAM, 0): %m");
- set_socket_buffer (tempfd2);
-
if (connect (tempfd2, (struct sockaddr *) &sun, sizeof (sun)) != 0)
FAIL_EXIT1 ("connect: %m");
unlink (sun.sun_path);
+ set_socket_buffer (tempfd2);
+
xpthread_barrier_wait (&b2);
if (arg != NULL)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-06 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 23:33 [glibc] tst-cancel4: Make blocking on write more portable Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).