This is still in draft stage , I have to publish them else I coudn't access my own blogs from my work place.
They are kind of nazi , I can't login into my blog.
There is good article to create threads
http://www.thegeekstuff.com/2012/04/create-threads-in-linux/
But this has led me to think about fork(), that creates child process . I am under impression that child process is just one more thread, but I have to confirm that now.
Also the code given is in C. I have to parallely work in Java. So have to check that also.
So this post at the end will have all the above things.
In case somone tries to execute code given in the link .
They have to write below command for compile ( provided u have saved file as thread.c)
> gcc -pthread -o output thread.c
>./output
and see how it behaves, for me it first printed second program and then first program
The other things I need to do before I forgot are
1) Code wise difference between thread creation and child process creation
2) How to post signals to threads of same child and thread of different child
3) In case we want to post some signal to a particular thread of a child, how to do that.
No comments:
Post a Comment