From 6424a49842ed9982c7edd1b847d88d66508f072b Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 11 Jan 2017 13:59:54 +0100 Subject: Fix race condition in STM DAG generation (in debug mode). The same file name for .dot graphs could be used by concurrent processes. --- lib/system.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/system.ml b/lib/system.ml index 4b99de707b..1817aed1fc 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -309,6 +309,7 @@ let with_time time f x = raise e let process_id () = - if Flags.async_proofs_is_worker () then !Flags.async_proofs_worker_id - else Printf.sprintf "master:%d" (Thread.id (Thread.self ())) - + Printf.sprintf "%d:%s:%d" (Unix.getpid ()) + (if Flags.async_proofs_is_worker () then !Flags.async_proofs_worker_id + else "master") + (Thread.id (Thread.self ())) -- cgit v1.2.3