Commit fa95f44
Thatgfsj
fix: use triggerOpenClawRestart for Windows unmanaged gateway restart
On Windows, neither SIGUSR1 nor SIGTERM are safe for cross-process
restart signaling: SIGUSR1 is unsupported, and Node.js unconditionally
terminates the target process on SIGTERM, bypassing any JS-level
handler. Instead, use the existing triggerOpenClawRestart() path
(schtasks-based handoff) which is the established Windows restart
mechanism. If it fails (e.g. no scheduled task installed), the error
message directs the user to run "openclaw gateway install".
Per ClawSweeper P1 review feedback — the SIGTERM substitution was
incorrect because: "Node v26 docs state that process.kill() with
SIGTERM on Windows causes unconditional termination of the target
process" so the gateway's SIGTERM handler would never run.1 parent 90fdf32 commit fa95f44
2 files changed
Lines changed: 36 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| |||
535 | 544 | | |
536 | 545 | | |
537 | 546 | | |
538 | | - | |
| 547 | + | |
539 | 548 | | |
540 | 549 | | |
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
544 | 553 | | |
545 | 554 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| |||
0 commit comments