Re: Processes and Threads
- From: phil-news-nospam@xxxxxxxx
- Date: 17 Sep 2007 04:54:01 GMT
On Sat, 15 Sep 2007 16:59:46 -0700 David Schwartz <davids@xxxxxxxxxxxxx> wrote:
| A thread (that is part of a process) can typically do two things:
|
| 1) Call a function like 'pthread_create' that creates an additional
| thread in the same process.
|
| 2) Call a function like 'fork' that creates a new process that starts
| with a single thread.
The inconsistency here is that the new process created contains an image
of a process state that looks like it has perhaps multiple threads running.
Each thread in the parent has its own stack. Which stack will the one new
thread in the child be using? There will at least be a lot more stuff the
child process has to clean up, like all the descriptors in use by all the
threads of the parent.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2007-09-16-2350@xxxxxxxx |
|------------------------------------/-------------------------------------|
.
- References:
- Processes and Threads
- From: Jan-Thierry Wegener
- Re: Processes and Threads
- From: David Schwartz
- Processes and Threads
- Prev by Date: What is the meaning of this code?
- Next by Date: Re: writing drivers using C++
- Previous by thread: Re: Processes and Threads
- Next by thread: What is the meaning of this code?
- Index(es):
Relevant Pages
|