What's the purpose of the for loop in the main of runtime.proc

I encountered following code at the end of the main func of https://golang.org/src/runtime/proc.go (Line 221 for the version at the time of this post):

exit(0)
for {
    var x *int32
    *x = 0
}

Anyone know what’s the purpose of the for loop?

Thanks.

It’s after exit, never executed. Perhaps, if you remove the exit line, the loop keeps the program running infinitely.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.