Commit d39f405
committed
🤖 fix: report correct exit codes for signal-terminated background processes
When a background process is killed by signal (SIGTERM, SIGKILL, etc.),
Node's exit event provides code=null and signal name. The spawnBackground
handler was defaulting null to 0, making killed processes appear as
successful exits.
- Add getExitCode() helper to convert signals to Unix-conventional exit
codes (128 + signal_number): SIGTERM=143, SIGKILL=137, etc.
- Add test verifying terminated processes report exit code >= 128
This restores behavior that was lost when bashExecutionService.ts was
removed during the Runtime refactor.1 parent 8bcee44 commit d39f405
File tree
2 files changed
+44
-2
lines changed- src/node
- runtime
- services
2 files changed
+44
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
38 | 59 | | |
39 | 60 | | |
40 | 61 | | |
| |||
246 | 267 | | |
247 | 268 | | |
248 | 269 | | |
249 | | - | |
| 270 | + | |
250 | 271 | | |
251 | 272 | | |
252 | 273 | | |
253 | | - | |
| 274 | + | |
254 | 275 | | |
255 | 276 | | |
256 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
227 | 248 | | |
228 | 249 | | |
0 commit comments