LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-18-2011, 01:54 PM   #1
apanimesh061
Member
 
Registered: Sep 2010
Posts: 51

Rep: Reputation: 0
Question How to create Parent and child thread and synchronize them ???


I wish to create a two threaded program ....
where the parent thread will do a job and return a value which the child thread will use for a job ....

How do I do that ?

Do I have to use fork/vfork with pthread_create ??
 
Old 09-18-2011, 03:51 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
1) This is not a kernel question

2) Yes, "pthreads" sounds like the best tool for the job

3) Here's a good place to start:

http://www.yolinux.com/TUTORIALS/Lin...ixThreads.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Child THREAD and Child PROCESS whho Linux - Newbie 12 02-16-2015 12:22 AM
Parent and child process Iyyaaz Programming 4 01-02-2011 11:20 AM
File descriptors shared between child and parent causing parent to hang. bharadiaam Linux - Newbie 1 03-02-2009 01:01 AM
getenv("LOGNAME") is incorrect when a child create a shell which call parent powah Programming 3 08-23-2007 12:29 AM
about parent and child process winwar Solaris / OpenSolaris 3 07-23-2003 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration