Initial commit

This commit is contained in:
eleksir
2024-01-06 18:33:44 +03:00
commit d85dc5d5bb
657 changed files with 262300 additions and 0 deletions

16
vendor/go.i3wm.org/i3/validpid.go generated vendored Normal file
View File

@@ -0,0 +1,16 @@
package i3
import "syscall"
func pidValid(pid int) bool {
// As per kill(2) from POSIX.1-2008, sending signal 0 validates a pid.
if err := syscall.Kill(pid, 0); err != nil {
if err == syscall.EPERM {
// Process still alive (but no permission to signal):
return true
}
// errno is likely ESRCH (process not found).
return false // Process not alive.
}
return true // Process still alive.
}