Commit 24864b7
fix(cortex-engine): handle SIGPIPE by detecting closed event channel
Fixes bounty issue #1525
When cortex run is piped to a command that closes the pipe (e.g., head -n 1),
the session event channel could return a Closed error. Previously this was ignored,
causing the session to keep running. Now we detect TrySendError::Closed and properly
shut down the session.1 parent 7a104aa commit 24864b7
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1374 | 1374 | | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | | - | |
1378 | | - | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1379 | 1392 | | |
1380 | 1393 | | |
1381 | 1394 | | |
| |||
0 commit comments