-
August 23rd, 2015, 01:16 PM
#1
forking a process in an existing thread
Hello
In C on *nix environment, can you fork a process from within a thread?
Is the thread invoking the fork replicated only or everything in the process?
What about heap memory - not directly allocated by the thread but can be referenced by it.
From initial attempt the fork just stalls and does not return so no error number either.
So wondering if it would work. Previously i hav only seen it done from main thread.
Thank you for thoughts.
-
August 23rd, 2015, 02:52 PM
#2
Re: forking a process in an existing thread
It should work. You can read about what is and isn't inherited here: http://pubs.opengroup.org/onlinepubs...ions/fork.html
gg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|