fix(tray): kill child PID before IPC close to avoid macOS NSStatusItem orphan
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
bb86808582
commit
e1db49190a
4 changed files with 20 additions and 6 deletions
|
|
@ -685,6 +685,11 @@ function startServer(latestVersion) {
|
|||
const { clearScreen } = require("./src/cli/utils/display");
|
||||
clearScreen();
|
||||
|
||||
// Kill current tray FIRST so the new bgProcess can register a fresh
|
||||
// NSStatusItem on macOS without conflicting with the orphan binary
|
||||
try { require("./src/cli/tray/tray").killTray(); } catch (e) { }
|
||||
await new Promise(r => setTimeout(r, 300));
|
||||
|
||||
// Enable auto startup on OS boot
|
||||
try {
|
||||
const { enableAutoStart } = require("./src/cli/tray/autostart");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue