unlock fix cung client

This commit is contained in:
2026-07-06 11:54:47 +07:00
parent 6cc520a0c4
commit 939097ddd9
3 changed files with 4 additions and 7 deletions

View File

@@ -250,11 +250,9 @@ func (b *Blocker) checkAndKill() {
myPid := uint32(os.Getpid())
for pid, info := range procs {
pNameLower := strings.ToLower(info.Name)
bundleIDLower := strings.ToLower(info.BundleID)
// 1. Always allow our app, system/critical developer tools, or agent helpers (and Antigravity IDE)
isAntigravity := strings.Contains(pNameLower, "antigravity") || strings.Contains(bundleIDLower, "antigravity")
if pid == myPid || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] || isAntigravity {
// 1. Always allow our app, system/critical developer tools, or agent helpers
if pid == myPid || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] {
continue
}

View File

@@ -354,8 +354,7 @@ func (b *Blocker) checkAndKill() {
// 1. Always allow our app, our sub-processes, system/critical developer tools, or agent helpers
isOurSubprocess := pid == myPid || isDescendantOf(pid, myPid)
isAntigravity := strings.Contains(pNameLower, "antigravity")
if isOurSubprocess || (currentExec != "" && pNameLower == currentExec) || isSystemAllowed(pNameLower) || isAntigravity {
if isOurSubprocess || (currentExec != "" && pNameLower == currentExec) || isSystemAllowed(pNameLower) {
continue
}

View File

@@ -380,7 +380,7 @@ func (b *Blocker) checkAndKill() {
// 1. Luôn cho phép hệ thống/app cốt lõi hoặc chính tiến trình này (bao gồm tiến trình con/cháu, và đổi tên)
isOurApp := w.PID == myPid || isDescendant(w.PID, myPid, parentMap)
if isOurApp || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] || strings.Contains(pNameLower, "antigravity") || strings.Contains(wTitleLower, "antigravity") {
if isOurApp || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] {
continue
}