From 4126f04fff25c150b5021383a9305ab1fa5d0e6d Mon Sep 17 00:00:00 2001 From: Brian McQuay Date: Fri, 11 Sep 2015 06:47:19 -0600 Subject: [PATCH] adding process id to tmp file to allow for concurrency --- lib/mj-page.js | 2 +- lib/mj-single.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mj-page.js b/lib/mj-page.js index b9743be4..abca8871 100644 --- a/lib/mj-page.js +++ b/lib/mj-page.js @@ -87,7 +87,7 @@ var MathJax; // filled in once MathJax is loaded var serverState = STATE.STOPPED; // nothing loaded yet var timer; // used to reset MathJax if it runs too long -var tmpfile = os.tmpdir() + "/mj-single-svg"; // file name prefix to use for temp files +var tmpfile = os.tmpdir() + "/mj-single-svg" + process.pid; // file name prefix to use for temp files var document, window, content, html; // the DOM elements diff --git a/lib/mj-single.js b/lib/mj-single.js index 958961f7..36cbd386 100644 --- a/lib/mj-single.js +++ b/lib/mj-single.js @@ -85,7 +85,7 @@ var MathJaxConfig; // configuration for when starting MathJax var MathJax; // filled in once MathJax is loaded var serverState = STATE.STOPPED; // nothing loaded yet var timer; // used to reset MathJax if it runs too long -var tmpfile = os.tmpdir() + "/mj-single-svg"; // file name prefix to use for temp files +var tmpfile = os.tmpdir() + "/mj-single-svg" + process.pid; // file name prefix to use for temp files var document, window, content, html; // the DOM elements