Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • What this demonstrates is that if you write to the parent dataspace prior to vforking, then all the threads will have the same value for for that variable. It also shows that you don't understand how sleep() is implemented. Finally, this should be its own question because it is a question, not an answer. Commented Oct 23, 2014 at 16:38
  • 2
    Which variable do you mean in particular? Could you please run this code and explain to me why all these pthreads perform actions while they should be suspended? Is it because sleep unsuspends them? I don't think that using sleep is crucial for this demo, because we see this behaviour in production, while we do not do sleep's there :/ Commented Oct 23, 2014 at 18:49
  • 1
    Please present this as a new question and I'll be happy to. I'm not trying to be obnoxious, but them's the StackOverflow rules (and they make sense for a site that wants to be pure Q&A) Commented Oct 23, 2014 at 19:44
  • 1
    @msw thanks, here is the question: unix.stackexchange.com/questions/163947/pthreads-and-vfork Commented Oct 24, 2014 at 7:56