Skip to content

Commit

Permalink
Merge pull request #8524 from rouault/workaround_8497
Browse files Browse the repository at this point in the history
ogr_proj_p.cpp: disable pthread_atfork() optimization on MacOS (fixes #8497)
  • Loading branch information
rouault authored Oct 19, 2023
2 parents bfea252 + 84717b5 commit 61e5616
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 61e5616

Please sign in to comment.