@samitouri / QOSami-HFS / commits / 5ee37522

console message "Quitting exit" was a bit confusing

Massimo Melina committed Apr 15, 2026 at 16:18 UTC 5ee37522c306868cc0f9b47b6a7e95b174e87615
4 files changed +6 -4
src/const.ts
+2
@@ -71,6 +71,8 @@ const bun = (globalThis as any).Bun
71 if (bun) console.log('Bun', bun.version)
72 console.log('Platform', process.platform, process.arch, IS_BINARY ? 'binary' : basename(process.execPath))
73 console.log('Pid', process.pid)
74 +setImmediate(() => // after commands.ts has handled console.debug
75 + console.debug("Args", argv))
76
77 function useHomeDir() {
78 if (!IS_WINDOWS || !IS_BINARY) return true
src/first.ts
+1 -1
@@ -12,7 +12,7 @@ export let quitting = false
12 // 'exit' event is handled as the last resort, but it's not compatible with async callbacks
13 onFirstEvent(process, ['exit', 'SIGQUIT', 'SIGTERM', 'SIGINT', 'SIGHUP'], signal => {
14 quitting = true
15 - console.log('Quitting', signal || '')
15 + console.log('Quitting with signal:', signal || 'unknown')
16 return Promise.allSettled(Array.from(cbsOnExit).map(cb => cb(signal))).then(() => {
17 console.debug('Process exit')
18 process.exit(0)
src/listen.ts
+1 -1
@@ -215,7 +215,7 @@ export function startServer(srv: typeof httpSrv, { port, host }: StartServer) {
215 srv.on('checkContinue', (req, res) => srv.emit('request', req, res))
216 port = await listen(host)
217 if (port)
218 - console.log(srv.name, "Serving on", renderHost(host || ''), ':', port)
218 + console.log(`Serving ${srv.name} on ${renderHost(host || '')} port ${port}`)
219 resolve(port)
220 }
221 catch(e) {
src/util-os.ts
+2 -2
@@ -82,10 +82,10 @@ async function getWindowsServicePids() {
82 export const runningAsWindowsService = IS_WINDOWS && getWindowsServicePids().then(x => {
83 const ret = x[pid] || x[ppid]
84 if (ret)
85 - console.log("running as service", ret)
85 + console.log("Running as service", ret)
86 return ret
87 }, e => {
88 - console.log("couldn't determine if we are running as a service")
88 + console.log("Couldn't determine if we are running as a service")
89 console.debug(e)
90 })
91