wolfcw / libfaketime

libfaketime modifies the system time for a single application
https://github.com/wolfcw/libfaketime
GNU General Public License v2.0
2.71k stars 324 forks source link

Add --disable-shm / FAKETIME_DISABLE_SHM #465

Closed Rob--W closed 6 months ago

Rob--W commented 6 months ago

The use of shared memory has side effects (triggering malloc and causing a deadlock or crash as reported in https://github.com/wolfcw/libfaketime/issues/130#issuecomment-1989773770).

Currently, the only way to opt out of shared memory is by compiling with -DFAKE_STATELESS.

To allow disabling shared memory without recompiling, this patch introduces the --disable-shm option to faketime, equivalent to setting the FAKETIME_DISABLE_SHM=1 environment variable.