sorry for maybe not being very clear on the title. I'm learning about processes and threads and although I looked trough many answers here on stackoverflow and many sites something still bugs my mind. This is my idea of how a thread and a process 'work'. We allocate some space for the process in RAM, set up all the essentials like the heap and the stack and then we start to execute. For simplicity lets assume we only execute the main() itself, no other loaders etc. Now in my head a process might have a program counter(?) but doesn't really use it as ONLY and ONLY threads gets executed themselves.
So basically what I'm trying to say is that a process launches a thread which gets executed but without that thread the process is just nothing really other then resources.
Extra question: If this is how it works, why would we even want to create a new process from a process(other then launchd which launches all the processes)?
I would really appreciate it if someone could clear up what is a process and thread is/does it work how I thought.
Thanks, have a nice day!