proper operation of exec() in multithreaded environment?
Posted: Thu Apr 28, 2016 1:53 pm
I am really confused about how exec() should operate in a multithreaded environment.
If we have threads A and B, which share memory and process ID, and thread A calls exec(), it now runs in a new address space, correct? But they still share the same process ID and so are still technically part of the same process.
Is this how it is supposed to be? I can see a lot of problems that may arise from a newly-started applications running alongside other threads with the same pid without knowing they exist.
If we have threads A and B, which share memory and process ID, and thread A calls exec(), it now runs in a new address space, correct? But they still share the same process ID and so are still technically part of the same process.
Is this how it is supposed to be? I can see a lot of problems that may arise from a newly-started applications running alongside other threads with the same pid without knowing they exist.