Well, as Jeffrey Yasskin states in
this code review, even
lambda: None
needs to allocate memory, which means
malloc()
, which means locking the heap lock. This could
in theory cause deadlock depending on the malloc and fork implementations that are being used. glibc's
fork()
dances around the issue locking/unlocking the malloc arena lock in
fork()
to avoid trouble... I would argue any sane implementation should. —
Marco Bonelli 48 secs ago