mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
90291bd627
ppd, and some things. Add a simple wpa_supplicant backend
17 lines
345 B
Go
17 lines
345 B
Go
package matugen
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
"syscall"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// procfs(5) is optional on FreeBSD; pkill(1) from base queries the kernel
|
|
// directly.
|
|
func signalByName(name string, sig syscall.Signal) {
|
|
signame := strings.TrimPrefix(unix.SignalName(sig), "SIG")
|
|
exec.Command("pkill", "-"+signame, "-x", name).Run()
|
|
}
|