{"record":{"id":"8e18b6ef07998f85","repo":"wavetermdev/waveterm","slug":"daemonize-not-supported-on-windows","errorCode":null,"errorMessage":"daemonize not supported on windows","messagePattern":"daemonize not supported on windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/jobmanager/jobmanager_windows.go","lineNumber":13,"sourceCode":"// Copyright 2026, Command Line Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n//go:build windows\n\npackage jobmanager\n\nimport (\n\t\"fmt\"\n)\n\nfunc daemonize(clientId string, jobId string) error {\n\treturn fmt.Errorf(\"daemonize not supported on windows\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":15,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/jobmanager/jobmanager_windows.go#L1-L15","documentation":"daemonize is a platform-specific stub on Windows that unconditionally returns this error. Daemonizing a process (detaching into the background with a log file) is only implemented for Unix; the Windows build has no equivalent. Any code path that calls daemonize on Windows will always fail.","triggerScenarios":"Calling any job-manager code path that invokes daemonize() on a Windows build of waveshell/jobmanager.","commonSituations":"Running the job manager or `wsh job` commands on Windows expecting background daemon behavior; CI environments on Windows runners.","solutions":["Do not use daemonization on Windows; run the job manager in the foreground or as a Windows Service.","Guard the daemonize call with runtime.GOOS checks and skip/replace it on Windows.","Implement a Windows-equivalent (e.g. service wrapper like kardianos/service) if background operation is required."],"exampleFix":"// before\nerr := daemonize(clientId, jobId)\n// after\nif runtime.GOOS == \"windows\" {\n    // run in foreground or use a service manager instead\n    return runForeground(clientId, jobId)\n}\nerr := daemonize(clientId, jobId)","handlingStrategy":"fallback","validationCode":"if runtime.GOOS == \"windows\" {\n    // skip daemonize path entirely\n}","typeGuard":null,"tryCatchPattern":"if err := daemonize(id, job); err != nil {\n    if runtime.GOOS == \"windows\" {\n        return runForeground(id, job) // fallback\n    }\n    return err\n}","preventionTips":["Branch on runtime.GOOS before calling daemonize","Use a Windows service wrapper for background operation","Document Windows limitations for job manager users"],"tags":["windows","platform-support","daemonization"],"backgroundTag":"unsupported-platform","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}