We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8e99cb commit bcca192Copy full SHA for bcca192
1 file changed
packages/opencode/src/signal.ts
@@ -7,6 +7,7 @@ const SIGNAL_EXIT_CODES: Record<string, number> = {
7
SIGTERM: 128 + 15,
8
SIGINT: 128 + 2,
9
SIGHUP: 128 + 1,
10
+ SIGQUIT: 128 + 3,
11
}
12
13
let shuttingDown = false
@@ -25,6 +26,7 @@ async function gracefulShutdown(signal: string) {
25
26
})
27
process.exit(SIGNAL_EXIT_CODES[signal] ?? 1)
28
}, SHUTDOWN_TIMEOUT_MS)
29
+ timeout.unref()
30
31
try {
32
await Instance.disposeAll()
@@ -37,7 +39,7 @@ async function gracefulShutdown(signal: string) {
37
39
38
40
41
export function registerSignalHandlers() {
- for (const signal of ["SIGTERM", "SIGINT", "SIGHUP"]) {
42
+ for (const signal of ["SIGTERM", "SIGINT", "SIGHUP", "SIGQUIT"]) {
43
process.on(signal, () => {
44
void gracefulShutdown(signal)
45
0 commit comments