CRYPTO_set_id_callback · Issue #10 · SWI-Prolog/packages-ssl · GitHub
Skip to content

CRYPTO_set_id_callback #10

Open
Open

Description

@JanWielemaker

Which id provider to use? see 4fddba0

Activity

  1. thetrime commented on Mar 9, 2015

    @thetrime
    Contributor

    The Apple documentation warns that:
    pthread_self() should be used, even on platforms where getpid() gives
    different answers in each thread, since that may depend on the machine
    the program is run on, not the machine where the program is being
    compiled. For instance, Red Hat 8 Linux and earlier used LinuxThreads,
    whose getpid() returns a different value for each thread. Red Hat 9
    Linux and later use NPTL, which is Posix-conformant, and has a getpid()
    that returns the same value for all threads in a process. A program
    compiled on Red Hat 8 and run on Red Hat 9 will therefore see getpid()
    returning the same value for all threads.

    PL_thread_self seems like a reasonable choice as well, since it hides most of this stuff behind an API. I think for the winpthreads-2 you will need pthread_self()->tid, but for pthread-win32 you need just pthread_self() which is perhaps a bit ugly.

  2. JanWielemaker commented on Mar 9, 2015

    @JanWielemaker
    MemberAuthor

    If this is still a dubious thing wrt. portability, I propose using PL_thread_self(). Can you change that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions