summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-30 00:07:49 +0000
committerKarl Berry <karl@freefriends.org>2010-03-30 00:07:49 +0000
commita41bd72f4fb1b22175a653065ad065fced11d4da (patch)
tree7c7f0f934ed0a3efc1d384cdf4b723b7051db7db /Build
parent899f74725ef26bec837b6c3564ffd0108c6db6ec (diff)
pid in recorder_name, Debian bug 575731, tex-k mail 29 Mar 2010 06:18:35
git-svn-id: svn://tug.org/texlive/trunk@17617 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog6
-rw-r--r--Build/source/texk/web2c/lib/openclose.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index ecd6c33876c..afa92ae30b3 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-30 Karl Berry <karl@tug.org>
+
+ * (recorder_start): throw in pid in recorder_name so parallel builds
+ have a chance of working. Report from
+ Kirill Smelkov, Debian bug 575731, tex-k mail 29 Mar 2010 06:18:35.
+
2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
* setupvar.c (setupboundvariable): Fix off by one error in msg.
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index 33b2ef985bc..364f11f9cd2 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -37,12 +37,19 @@ int texinputtype;
static void
recorder_start(void)
{
- /* Alas, while we might want to use mkstemp it is not portable.
- So we have to be content with using a default name... */
+ /* Alas, while we'd like to use mkstemp it is not portable,
+ and doing the autoconfiscation (and providing fallbacks) is more
+ than we want to cope with. So we have to be content with using a
+ default name. Throw in the pid so at least parallel builds might
+ work (Debian bug 575731). */
string cwd;
+ pid_t pid = getpid();
+ char pid_str[MAX_INT_LENGTH];
+ sprintf (pid_str, "%ld", (long) pid);
recorder_name = (string)xmalloc(strlen(kpse_program_name)+5);
strcpy(recorder_name, kpse_program_name);
+ strcat(recorder_name, pid_str);
strcat(recorder_name, ".fls");
/* If an output directory was specified, use it instead of cwd. */