NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to disable perfused trace (for cryfs)?



On Wed, Jul 16, 2025 at 07:43:39PM +0600, unadvised wrote:
> +#  if defined(__NetBSD__)
> +  const int result = pthread_setname_np(pthread_self(), name_.c_str(),
> (void*)strlen(name_.c_str())); +#  else
>    const int result = pthread_setname_np(pthread_self(), name_.c_str());
> +#  endif

That is wrong. Make it:

    const int result = pthread_setname_np(pthread_self(), "%s", name_.c_str())

Do not confuse "arg" with the "len" argument from pthread_getname_np().

Martin


Home | Main Index | Thread Index | Old Index