This commit is contained in:
dongchangxi committed 2024-03-07 09:43:48 +08:00
1 parent 2d01e4d0de
commit 9a6d9f6f37
12 files changed
+57 -26

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"time"
"syscall"
)
// 执行exe 文件,开启视频监控的服务进程
@@ -34,6 +35,7 @@ func killPiServerExe() {
exeName := "piVideo.exe"
// 使用exec.Command函数创建一个Cmd结构体,用于执行命令
cmd := exec.Command("taskkill", "/f", "/im", exeName)
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow:true}
// 将命令的输出和错误连接到当前进程的标准输出和标准错误
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr