-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit 6af8ef0
Fix a race condition in TexManager.make_dvi.
Previously, a race condition could occur if, while a process had called
make_tex (generating the tex file in the global cache) and was going to
call the latex subprocess (to generate the dvi file), another process
also called make_tex for the same tex string and started rewriting the
tex source. In that case, the latex subprocess could see a partially
written (invalid) tex source.
Fix that by generating the tex source in a process-private temporary
directory, where the latex process is already going to run anyways.
(This is cheap compared to the latex subprocess invocation.)1 parent 780e66c commit 6af8ef0
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
287 | - | ||
288 | - | ||
287 | + | ||
288 | + | ||
289 | + | ||
290 | + | ||
289 | 291 |
| |
290 | 292 |
| |
291 | 293 |
| |
| |||
296 | 298 |
| |
297 | 299 |
| |
298 | 300 |
| |
299 | - | ||
301 | + | ||
302 | + | ||
300 | 303 |
| |
301 | 304 |
| |
302 | - | ||
303 | - | ||
304 | - | ||
305 | + | ||
306 | + | ||
305 | 307 |
| |
306 | 308 |
| |
307 | 309 |
| |
|
0 commit comments