mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Steve Osselton <steve.osselton@prismtech.com>
To: musl@lists.openwall.com
Subject: Duplicate call to pthread_join segvs
Date: Thu, 18 Aug 2016 12:51:23 +0100	[thread overview]
Message-ID: <CAHjooHG3+O9d8odW5D=Q7YaS-cpGD7hAWW+96-Wzff++WLs8+g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

Hi,

Am using musl on the latest Alpine Linux release. Although the behaviour of
calling pthread_join on
the same thread is undefined, would be nice if returned an errno as opposed
to a segv:

#include <pthread.h>

void * start_routine (void * arg)
{
}

int main (int argc, char ** argv)
{
  pthread_t id;

  pthread_create (&id, NULL, start_routine, NULL);
  pthread_join (id, NULL);
  pthread_join (id, NULL);
}

Cheers Steve.

[-- Attachment #2: Type: text/html, Size: 701 bytes --]

             reply	other threads:[~2016-08-18 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 11:51 Steve Osselton [this message]
2016-08-18 12:47 ` Rich Felker

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='CAHjooHG3+O9d8odW5D=Q7YaS-cpGD7hAWW+96-Wzff++WLs8+g@mail.gmail.com' \
    --to=steve.osselton@prismtech.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).