unlock fix cung client
This commit is contained in:
@@ -250,11 +250,9 @@ func (b *Blocker) checkAndKill() {
|
|||||||
myPid := uint32(os.Getpid())
|
myPid := uint32(os.Getpid())
|
||||||
for pid, info := range procs {
|
for pid, info := range procs {
|
||||||
pNameLower := strings.ToLower(info.Name)
|
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)
|
// 1. Always allow our app, system/critical developer tools, or agent helpers
|
||||||
isAntigravity := strings.Contains(pNameLower, "antigravity") || strings.Contains(bundleIDLower, "antigravity")
|
if pid == myPid || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] {
|
||||||
if pid == myPid || (currentExec != "" && pNameLower == currentExec) || systemAllowed[pNameLower] || isAntigravity {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -354,8 +354,7 @@ func (b *Blocker) checkAndKill() {
|
|||||||
|
|
||||||
// 1. Always allow our app, our sub-processes, system/critical developer tools, or agent helpers
|
// 1. Always allow our app, our sub-processes, system/critical developer tools, or agent helpers
|
||||||
isOurSubprocess := pid == myPid || isDescendantOf(pid, myPid)
|
isOurSubprocess := pid == myPid || isDescendantOf(pid, myPid)
|
||||||
isAntigravity := strings.Contains(pNameLower, "antigravity")
|
if isOurSubprocess || (currentExec != "" && pNameLower == currentExec) || isSystemAllowed(pNameLower) {
|
||||||
if isOurSubprocess || (currentExec != "" && pNameLower == currentExec) || isSystemAllowed(pNameLower) || isAntigravity {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
// 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)
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user