mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 16:40:52 +00:00
introduce git-shell
This commit is contained in:
parent
2b10fdc4dc
commit
c50a3503e6
16 changed files with 155 additions and 135 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue