After gpg key generation, coredumps are disabled as "ulimit -c" is set to zero via the gpg-agent, see SUSE bug [0]. Could the disable_core_dumps() call be securely moved to the fork code path? See the patch in [1] and the comments about [2].
[0] https://bugzilla.suse.com/show_bug.cgi?id=1124847
[1] https://bugzilla.suse.com/show_bug.cgi?id=1124847#c6
[2] https://dev.gnupg.org/T1509