perf icon indicating copy to clipboard operation
perf copied to clipboard

Bugfix: runtime.LockOSThread required for command

Open pwaller opened this issue 2 years ago • 0 comments

The ptrace API requires that you call it from the same thread, so starting the process must lock the thread until we're done with the ptrace API.

Doc ref: https://pkg.go.dev/syscall#SysProcAttr

Without this, if I use this in a tight loop, it hangs.

pwaller avatar Jun 22 '23 19:06 pwaller