diff options
author | Unknwon <u@gogs.io> | 2015-11-26 17:33:45 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-26 17:33:45 -0500 |
commit | c50a3503e6e8ece0dabd109932a72fe093c3cab3 (patch) | |
tree | d9918c4b9c5d5efc94771cae22231fdcc0796102 /modules/process | |
parent | 2b10fdc4dcb987b347b031f460cf4f02fd48a31a (diff) | |
download | gitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.tar.gz gitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.zip |
introduce git-shell
Diffstat (limited to 'modules/process')
-rw-r--r-- | modules/process/manager.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/process/manager.go b/modules/process/manager.go index 68c33315d0..1f98ca7cfb 100644 --- a/modules/process/manager.go +++ b/modules/process/manager.go @@ -113,7 +113,8 @@ func Remove(pid int64) { func Kill(pid int64) error { for i, proc := range Processes { if proc.Pid == pid { - if proc.Cmd.Process != nil && proc.Cmd.ProcessState != nil && !proc.Cmd.ProcessState.Exited() { + if proc.Cmd != nil && proc.Cmd.Process != nil && + proc.Cmd.ProcessState != nil && !proc.Cmd.ProcessState.Exited() { if err := proc.Cmd.Process.Kill(); err != nil { return fmt.Errorf("fail to kill process(%d/%s): %v", proc.Pid, proc.Description, err) } |