Files
cli/cmd/networkcmd/process_windows.go
zeekayandHanzo Dev 6757e4edab the corporate name is Lux Industries Inc
Lux Partners Limited is not the entity behind this work. Every place the
old name stood — copyright lines, site footers, brand config, legal and
compliance text — now names the company that actually holds it.

lux.fund is the exception and is not renamed to match: that site belongs
to Lux Assets Management LLC, a different company, and it says so.

Two kinds of line were left for a person rather than rewritten. A dated
news item recording that Lux Partners Limited was established in the Isle
of Man is a historical fact, and renaming it would falsify the record. And
a sentence asserting that the company is domiciled in the Isle of Man is a
claim about a jurisdiction, not a name — an Inc or an LLC is not an Isle
of Man company, so swapping the name there would assert something untrue.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-28 12:57:49 -07:00

34 lines
847 B
Go

// Copyright (C) 2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
//go:build windows
package networkcmd
import (
"golang.org/x/sys/windows"
)
// STILL_ACTIVE is the exit code for a running process on Windows
const stillActive = 259
// isProcessRunning checks if a process with the given PID is running
func isProcessRunning(pid int) bool {
// On Windows, we open the process handle to check if it exists
handle, err := windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pid))
if err != nil {
return false
}
defer windows.CloseHandle(handle)
// Check if process has exited
var exitCode uint32
err = windows.GetExitCodeProcess(handle, &exitCode)
if err != nil {
return false
}
// stillActive (259) means process is running
return exitCode == stillActive
}