diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-30 00:07:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-30 00:07:49 +0000 |
commit | a41bd72f4fb1b22175a653065ad065fced11d4da (patch) | |
tree | 7c7f0f934ed0a3efc1d384cdf4b723b7051db7db /Build/source/texk/web2c/lib/openclose.c | |
parent | 899f74725ef26bec837b6c3564ffd0108c6db6ec (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/source/texk/web2c/lib/openclose.c')
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 11 |
1 files changed, 9 insertions, 2 deletions
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. */ |