Browse Source

plan9 doesn't support syscall.Kill

master
Gregory Rudolph 2 years ago
parent
commit
e2224092f5
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 8
      main.go

8
main.go

@ -8,7 +8,6 @@ import ( @@ -8,7 +8,6 @@ import (
"os"
"os/exec"
"strings"
"syscall"
"time"
)
@ -137,7 +136,12 @@ func processCommand(cmd string) error { @@ -137,7 +136,12 @@ func processCommand(cmd string) error {
if verb == "restart" || verb == "stop" {
for testSvc := range services {
if svc == testSvc {
err := syscall.Kill(services[svc].ProcessHandle.Pid, 9)
f, err := os.OpenFile(fmt.Sprintf("/proc/%d/ctl", services[svc].ProcessHandle.Pid), os.O_WRONLY, 0600)
if err != nil {
log.Printf("")
}
defer f.Close()
_, err = f.WriteString("kill")
if err != nil {
log.Printf(DAEMON_CTL_FAILED, err, time.Since(start))
} else {

Loading…
Cancel
Save