mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 13:10:07 +00:00
🚀 dashboard v0.14.7 with agent v0.14.4
This commit is contained in:
@@ -465,6 +465,7 @@ func handleTerminalTask(task *pb.Task) {
|
||||
read, err := tty.Read(buf)
|
||||
if err != nil {
|
||||
conn.WriteMessage(websocket.TextMessage, []byte(err.Error()))
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
conn.WriteMessage(websocket.BinaryMessage, buf[:read])
|
||||
|
||||
@@ -61,7 +61,7 @@ func (pty *Pty) killChildProcess(c *exec.Cmd) error {
|
||||
c.Process.Kill()
|
||||
}
|
||||
// Kill the whole process group.
|
||||
syscall.Kill(-pgid, syscall.SIGTERM)
|
||||
syscall.Kill(-pgid, syscall.SIGKILL) // SIGKILL 直接杀掉 SIGTERM 发送信号,等待进程自己退出
|
||||
return c.Wait()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user