[英]Im trying to kill a golang script on a specific process id but when i kill it it says terminated but is still running
Im trying to kill a golang script on the process id that i ran in on but when i kill it keeps running but i dont want to do pkill because that will kill all the golang scripts running and i have multible running我试图在我运行的进程 id 上杀死一个 golang 脚本,但是当我杀死它时它会继续运行,但我不想执行 pkill,因为这会杀死所有运行的 golang 脚本并且我有多个运行
As explained here , in case your script uses go run
, your kill
is only sent to the go run
process that is waiting for the actual child process to finish.如此处所述,如果您的脚本使用
go run
,您的kill
只会发送到正在等待实际子进程完成的go run
进程。 You should first use go build
to compile a binary and then run that binary.您应该首先使用
go build
编译二进制文件,然后运行该二进制文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.