sd-event: store and compare per-module static origin id
sd-event objects use hashmaps, which use module-global state, so it is not safe to pass a sd-event object created by a module instance to another module instance (e.g.: when two libraries static linking sd-event are pulled in a single process). Initialize a random per-module origin id and store it in the object, and compare it when entering a public API, and error out if they don't match, together with the PID.
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
<varlistentry>
|
||||
<term><constant>-ECHILD</constant></term>
|
||||
|
||||
<listitem><para>The event loop has been created in a different process.</para></listitem>
|
||||
<listitem><para>The event loop has been created in a different process, library or module instance.</para></listitem>
|
||||
|
||||
</varlistentry>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user