Commit 3071213
committed
fix(win): stabilize non-interactive execution and prevent CLI hangs
- Replace blocking stdin read in worker with timeout-bounded threaded read (5s safety limit)
- Harden safe_input() to avoid indefinite blocking on daemon/worker IO
- Add socket timeouts for dispatcher daemon connections to prevent hang on CLI routing
- Detect daemon logs follow mode (-f/--follow) to correctly mark interactive sessions on Windows and Linux
- Improve dispatcher interactivity detection logic for info/config/log-follow commands
This improves CLI reliability under non-interactive and daemon-routed execution paths,
preventing deadlocks during long-running or headless invocations.
Modified:
• src/omnipkg/common_utils.py (+19/-3 lines)
• src/omnipkg/dispatcher.c (+10/-1 lines)
• src/omnipkg/dispatcher.py (+17/-1 lines)
[gitship-generated]1 parent 5adf277 commit 3071213
3 files changed
Lines changed: 46 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
752 | 768 | | |
753 | | - | |
| 769 | + | |
754 | 770 | | |
755 | 771 | | |
756 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
2058 | | - | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2059 | 2068 | | |
2060 | 2069 | | |
2061 | 2070 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
229 | 243 | | |
230 | 244 | | |
231 | 245 | | |
| |||
240 | 254 | | |
241 | 255 | | |
242 | 256 | | |
| 257 | + | |
243 | 258 | | |
244 | 259 | | |
245 | 260 | | |
| |||
248 | 263 | | |
249 | 264 | | |
250 | 265 | | |
| 266 | + | |
251 | 267 | | |
252 | 268 | | |
253 | 269 | | |
| |||
0 commit comments