Groups
Groups
Sign in
Groups
Groups
golang-nuts
Conversations
About
Send feedback
Help
what is these code line for?
76 views
Skip to first unread message
xie cui
unread,
Dec 9, 2020, 2:10:44 AM
12/9/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
https://github.com/golang/go/blob/master/src/runtime/proc.go#L248-L251
why these codes, it seem is unnecessary?
Ian Lance Taylor
unread,
Dec 9, 2020, 2:34:47 AM
12/9/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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