3 ms·
It all looks correct to me. Some of it is a little "needlessly-surprised", honestly, like the bit about having to make a syscall trap to exit the program. Pro
by ajross 17y ago
It all looks correct to me. Some of it is a little "needlessly-surprised", honestly, like the bit about having to make a syscall trap to exit the program. Programs don't exit on their own: something needs to tell the kernel that the process is done.
- jcdreads 17y agoThis point isn't actually blindingly obvious. Those of us raised on Pascal might have assumed (or, in my case, actually did assume, without thinking hard about it) that the program ended when the execution point reached "the end," where the main method was probably located in the binary. It's disturbing how many Pascal-isms still pervade my thinking, even 20 years since I last (willingly) touched the language.
- watmough 17y agoI don't think this is blindingly obvious. I always imagined something 'called us', then just returning from that would be enough to get everything shutdown. Certainly when I wrote 6502 code, or 68000 code, I would just return. On the iPhone, you get advised you are shutting down, do your clean-up, then someone shuts down the message loop and you are gone.