Why not just panic, though? And why the infinite loop, I wonder?

On Thu, Jun 15, 2017 at 9:56 AM Aldrin Leal <ald...@leal.eng.br> wrote:

> Force a panic in case exit fails?
>
> --
> -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal
>
> On Thu, Jun 15, 2017 at 4:54 AM, <goodwin.law...@gmail.com> wrote:
>
>> Hey,
>>
>> Learning golang at the moment and came across this at the end of func
>> main() in proc.go in the golang source tree.
>>
>> exit(0)
>> for {
>> var x *int32
>> *x = 0
>> }
>>
>> Ln 198 - 202 https://golang.org/src/runtime/proc.go
>>
>> How is the for loop ever reached and what's the purpose of the infinite
>> loop, zeroing memory?
>>
>> Thanks,
>>
>> Goodwin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Tyler Compton
Software Engineering

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to