--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Force a panic in case exit fails?
On Thu, Jun 15, 2017 at 4:54 AM, <goodwin...@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.goHow 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...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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?
On Thu, Jun 15, 2017 at 4:54 AM, <goodwin...@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.goHow 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>>> email to golang-nuts+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com.
>>> email to golang-nuts...@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...@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...@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...@googlegroups.com.
--
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...@googlegroups.com.
It won't blank as much as it can get it's hands on. The default value for the pointer will be nil so it will try and assign (causing a panic() hopefully) to force an exit
--
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...@googlegroups.com.