|Title||Telemetry interacts poorly with fork|
|Assigned user||Gareth Rees|
|Description||Forking a process that's outputting telemetry has these problems:|
1. The parent and child continue to use the same file handle, and so their telemetry output will be mixed into the same file.
2. At the point where the fork happens, there may be logged events in the telemetry buffers; these get output by both the parent and child after the fork even though they only happened in the parent.
3. Clock values (in EventClockSync events) go back to zero in the child process (see job004098).
|Analysis||1. Close the telemetry file in the child and open a new one. We could deduplicate these by using the process id in some way, but beware process id wrap-around.|
2. Call EventSync in the prepare handler so that the buffers are empty at the point where fork happens.
|Created by||Gareth Rees|
|Created on||2018-06-14 12:25:55|
|Last modified by||Gareth Rees|
|Last modified on||2018-07-23 14:18:55|
|History||2018-06-14 GDR Created.|