Skip to main content
Glama
manager_unix.go716 B
//go:build !windows package daemon import ( "os" "os/exec" "syscall" ) // killProcess sends a signal to a process func killProcess(pid int, signal syscall.Signal) error { return syscall.Kill(pid, signal) } // isProcessAlive checks if a process is still running func isProcessAlive(pid int) bool { return syscall.Kill(pid, 0) == nil } // setSysProcAttr sets platform-specific process attributes func setSysProcAttr(cmd *exec.Cmd) { cmd.SysProcAttr = &syscall.SysProcAttr{ Setsid: true, } } // getHomeDir returns the user's home directory func getHomeDir() string { if home := os.Getenv("HOME"); home != "" { return home } return os.Getenv("USERPROFILE") // fallback for Windows-like environments }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/babelcloud/gru-sandbox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server