Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogr_proj_p.cpp: disable pthread_atfork() optimization on MacOS (fixes #8497) #8524

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ogr/ogr_proj_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@

#include "proj.h"

#if defined(__MACH__) && defined(__APPLE__) && defined(HAVE_PTHREAD_ATFORK)
// Works around a weird issue with GDAL, numpy and python threading on
// Mac. There is definitely something not understood, but as using pthread_atfork()
// is just an optimization, just disable it.
// Cf https://github.com/OSGeo/gdal/issues/8497 for details
#undef HAVE_PTHREAD_ATFORK
#endif

#ifndef _WIN32
#include <sys/types.h>
#include <unistd.h>
Expand Down
Loading