NetBSD specific stuff
Details
Today
POSIX documentation never says that PSHARED=0 prevents sharing among processes. In my opinion, it still conforms to POSIX even when a PSHARED=0 semaphore can be shared between parent and child processes.
Yesterday
Thanks. Will go int the next version.
I've tried the new patch in my environment, and it fixes the gnupg HEAD self tests as well. Thank you!
In tests/migrations, (unlike tests/openpgp and tests/cms), the tests do not prepare gpg-agent, but it is gpg which invokes gpg-agent if needed.
Because of that, on NetBSD (where POSIX semaphore has a different semantics), it hangs with gpg --list-secret-key, when gpg tries to spawn the gpg-agent process.
In the old code of 2.4, it simply ignore the npth_protect and npth_unprotect when calling fork to spawn a process.
New code in libgpg-error cares about npth_protect and npth_unprotect but it was not sufficient; We need to care about NetBSD's semantics. Child process should not call npth_protect. With shared semantics, child process's calling npth_protect affects to cause parent process: it hangs.
@wiz Thank you for your quick feedback.
Mon, Feb 2
Thank you for the patch. I've tried it in my environment, and gnupg 987c6a398a9505399b2c25a775d4b625753bc962 passes all its self-tests for me now!
Thank you for the log.
Sun, Feb 1
Fri, Jan 30
Thank you for looking at this.
I'm testing with gnupg git head as of today, please let me know if you prefer 2.5.17 instead.
Thank you for your report.
Thu, Jan 29
I bisected it and found the commit that introduced this test failure:
In the same environment, 2.4.9 passes its self tests.
I've reverted the update in pkgsrc until this can be resolved.
Wed, Jan 28
The previous pkgsrc version was 2.4.9. However, I've just tested 2.5.14 and saw the same behaviour (so I guess there is no point in testing 2.5.16).
Do you remember wether you had the same problem also with 2.5.14 or 2.5.16? Or can you test with these versions? Which version of libgpg-error are you using?
Nov 6 2025
Applied to 1.11 branch.
Aug 4 2025
May 15 2025
Also pushed to 1.11
