Commit 5d3aa1a
fix: address PR #41 review findings (race + shell quoting)
- src/eneru/multi_ups.py: move _global_shutdown_flag.unlink() inside
the _local_shutdown_lock block so the boolean reset and the file
removal are atomic with respect to _handle_local_shutdown. Without
this, a thread that re-touches the flag between the bool reset and
the unlink ends up with the coordinator's in-memory state saying
"shutdown in flight" while the on-disk evidence is gone — a state
worse than the bug we set out to fix. (cubic.dev finding)
- tests/e2e/groups/single-ups.sh Test 34: quote $E2E_DIR / $REARM_DIR
/ $DAEMON_PID expansions and switch the EXIT trap to a single-quoted
command so $DAEMON_PID resolves at trap-fire time, not trap-set
time. (CodeRabbit nitpick)
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent cf23ff4 commit 5d3aa1a
2 files changed
Lines changed: 24 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
383 | 392 | | |
384 | 393 | | |
385 | 394 | | |
386 | | - | |
| 395 | + | |
387 | 396 | | |
388 | 397 | | |
389 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
| 457 | + | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
501 | | - | |
| 505 | + | |
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
| |||
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
520 | | - | |
| 524 | + | |
521 | 525 | | |
522 | 526 | | |
523 | 527 | | |
524 | 528 | | |
525 | | - | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
546 | | - | |
| 550 | + | |
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
551 | | - | |
552 | | - | |
| 555 | + | |
| 556 | + | |
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
| |||
0 commit comments