Repository navigation
Commit 00e7709
fix: keep the SIGINT exit status of a measured subprocess #2362
With `patch = subprocess` on Python 3.13, a child process stopped with
SIGINT exited with status 1 instead of dying from the signal. This was a
regression in 7.17.1, from 1ade056.
SqliteDb reconnects for every outermost `with` block, and each read-write
connection ran check_hot_journal(). So the atexit save probed the data file
over and over, and the probe's pathlib.Path.as_uri() call during shutdown
kept Python 3.13 from re-raising the unhandled KeyboardInterrupt as a SIGINT
death.
Now each SqliteDb probes only on its first read-write connection. A new
data object for the same file still probes, so a hostile journal planted
beside an existing data file is still refused.
Fixes #2362
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 89e8aef commit 00e7709
3 files changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1527 | 1527 | | |
1528 | 1528 | | |
1529 | 1529 | | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1530 | 1566 | | |
1531 | 1567 | | |
1532 | 1568 | | |
| |||
0 commit comments