public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] tst-cancel4: Make blocking on write more portable Date: Thu, 6 Aug 2020 23:33:40 +0000 (GMT) [thread overview] Message-ID: <20200806233340.781573857C45@sourceware.org> (raw) 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)
reply other threads:[~2020-08-06 23:33 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=20200806233340.781573857C45@sourceware.org \ --to=sthibaul@sourceware.org \ --cc=glibc-cvs@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: linkBe 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).