Commit 65b26e3
Fix auto-update hang by force-exiting stuck PTY cleanup
When quitAndInstall fires, Squirrel's ShipIt sanity-checks that the
target app has actually exited before swapping the bundle. If any PTY
child (stuck claude, shell with background jobs) ignores SIGHUP, the
main process hangs draining the fd, Squirrel aborts, and the old
version relaunches. Later the zombie process crashes and macOS shows
the "unexpectedly quit" dialog.
- updater:quitAndInstall now SIGKILLs PTYs, strips the before-quit
listener, kicks off ShipIt, and force-exits after 1.5s
- before-quit (Cmd+Q path) keeps the graceful SIGHUP but arms a 1.5s
watchdog so a stuck child can't hang the process indefinitely
- pty-manager kill/killAll accept an optional signal and tolerate
already-dead PTYs
- dev:debug script now watches the real dev userData dir
(Harness (Dev)) and cleans up its tail on exit via trap
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 71e651a commit 65b26e3
3 files changed
Lines changed: 56 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
640 | 670 | | |
641 | 671 | | |
642 | 672 | | |
| |||
842 | 872 | | |
843 | 873 | | |
844 | 874 | | |
| 875 | + | |
845 | 876 | | |
846 | 877 | | |
| 878 | + | |
847 | 879 | | |
848 | 880 | | |
849 | 881 | | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
850 | 895 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | | - | |
| 98 | + | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
0 commit comments