what is these code line for?

76 views
Skip to first unread message

xie cui

unread,
Dec 9, 2020, 2:10:44 AM12/9/20
to golang-nuts

Ian Lance Taylor

unread,
Dec 9, 2020, 2:34:47 AM12/9/20
to xie cui, golang-nuts
On Tue, Dec 8, 2020 at 11:11 PM xie cui <cuiw...@gmail.com> wrote:
>
> https://github.com/golang/go/blob/master/src/runtime/proc.go#L248-L251
> why these codes, it seem is unnecessary?

Those lines are there to help new ports. If the `exit` function isn't
working right, it might return. If the signal handler isn't working
right, `*x = 0` might not panic. At least the loop will stop the
program from doing something unexpected.

Ian
Reply all
Reply to author
Forward
0 new messages