diff options
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 11 |
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. */ |