unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited] 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: libc-alpha; +Cc: commit-hurd

* nptl/tst-cancel4.c (tf_send, tf_sendto): Set socket buffer size after
connecting.
---
 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)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-06 23:34 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 [hurd,commited] 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).