Commit 6ab5280
committed
Add signal handlers to release lock on SIGINT/SIGTERM/SIGHUP
This prevents stale lockfiles from being left behind when the build
process is interrupted by a signal (Ctrl+C, kill, terminal close).
The signal handlers:
- Register after the lock is acquired
- Release the lock before re-emitting the signal to allow normal termination
- Are cleaned up after normal build completion to avoid memory leaks
Also adds a test to verify signal handlers are properly registered
and removed during the build lifecycle.1 parent 2d6f655 commit 6ab5280
File tree
2 files changed
+74
-1
lines changed- packages/app/src/cli/services/build
2 files changed
+74
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
391 | 423 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
133 | 169 | | |
134 | 170 | | |
135 | 171 | | |
| |||
170 | 206 | | |
171 | 207 | | |
172 | 208 | | |
173 | | - | |
| 209 | + | |
| 210 | + | |
174 | 211 | | |
175 | 212 | | |
176 | 213 | | |
| |||
181 | 218 | | |
182 | 219 | | |
183 | 220 | | |
| 221 | + | |
| 222 | + | |
184 | 223 | | |
185 | 224 | | |
186 | 225 | | |
| |||
231 | 270 | | |
232 | 271 | | |
233 | 272 | | |
| 273 | + | |
| 274 | + | |
234 | 275 | | |
235 | 276 | | |
236 | 277 | | |
| |||
0 commit comments