GO solves the error of fork/exec ...\b001\exe\main.exe:Access is denied.

Table of contents

1. Solve the error of fork/exec ...\b001\exe\main.exe:Access is denied.


1. Solve the error of fork/exec ...\b001\exe\main.exe:Access is denied.

Scenario reproduction : The following is a simple code for beginners to learn the go language. The code is run in vscode, but an error is reported during the operation:

package main

import "fmt"

// 行注释 ctrl+l
// 块注释 shift+alt+a

func test1(){
	// 切片
	var s1 = []int{1, 2, 3, 4, 5, 6}
	s2 := s1[3:5]
	fmt.Printf("s2: %v\n", s2)
	s3 := s1[:]
	fmt.Printf("s3: %v\n", s3)
}

func main() {
	test1()
}

Reason : When I run the code, 360 will pop up a box showing that there is a Trojan horse intrusion. No matter whether I choose to clear the Trojan horse or allow it, it will inevitably run in the end, and the error result shows that it has been blocked.

Solution : turn off the anti-virus software of the computer, the local machine downloads 360, directly choose to temporarily exit for one hour in the lower right corner of the computer (the computer is not protected during this period), and then re-run the code,

 It was found that the operation was successful.

ok, the problem is solved.

 

Guess you like

Origin blog.csdn.net/qq_45956730/article/details/129102190