Skip to content

Commit fa30875

Browse files
committed
fix(computer): force process exit after demo completes
The Node.js process hung after demo succeeded because Obsidian child processes kept it alive. Use SIGKILL + process.exit(0) to ensure clean exit.
1 parent 7b2061f commit fa30875

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

computer/electron-demo/demo.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,14 @@ function launchApp(
151151

152152
console.log('Electron demo completed successfully!');
153153
} finally {
154-
// Cleanup: kill the Obsidian process
154+
// Cleanup: kill the Obsidian process tree and force exit
155155
if (child.pid) {
156156
try {
157-
process.kill(-child.pid, 'SIGTERM');
157+
process.kill(-child.pid, 'SIGKILL');
158158
} catch {
159159
// Process may have already exited
160160
}
161161
}
162+
process.exit(0);
162163
}
163164
})();

0 commit comments

Comments
 (0)