From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>, commit-hurd@gnu.org
Subject: [hurd,commited] tst-cancel4: Make blocking on write more portable
Date: Fri, 7 Aug 2020 01:33:59 +0200 [thread overview]
Message-ID: <20200806233359.1002798-1-samuel.thibault@ens-lyon.org> (raw)
* 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
reply other threads:[~2020-08-06 23:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200806233359.1002798-1-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=commit-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).