Commit 2f65df3
fix: temp dir race condition in MCP Dockerfile swap
Background cleanup watcher used wait() on PIDs from the parent shell,
but wait() only works for child processes of the calling subshell. The
cleanup subshell's wait() returned immediately, deleting the temp dir
before Harbor could read it. Every MCP launch hit FileNotFoundError.
Fix: collect temp dirs in _MCP_TEMP_DIRS array, clean them up in
_drain_pool() which runs in the parent shell and can properly wait
for all harbor PIDs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4fd7aad commit 2f65df3
1 file changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
347 | 355 | | |
348 | 356 | | |
349 | 357 | | |
| |||
431 | 439 | | |
432 | 440 | | |
433 | 441 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
0 commit comments