From: "Lejanson C. Go" <lejanson@ntsp.nec.co.jp>
To: linux-c-programming <linux-c-programming@vger.kernel.org>
Subject: about Posix Threads
Date: Tue, 20 May 2003 14:51:51 +0800 [thread overview]
Message-ID: <3EC9D087.3060804@hq.ntsp.nec.co.jp> (raw)
hello everyone. i am new here. i just would like to ask some
questions regarding posix threads and i hope someone could help
me.
i made a pthread program and i am quite puzzled why my program
spawns 4 threads.. when i view it in linux console.
i used 'ps -ax | grep myprog' command to get the processes for
my application and to my surprise it spawns 4 threads.. when i
only expected 3.. one for main, one for event, and one for recvdata.
spawnXXXXXX functions create new threads..
i really need ur help. can anyone tell me why this occur?
thanks a lot...
lejanson
=============/* snipp */==================
int main(void)
{
................
................
................
if (spawnEventThrd())
{
fprintf(stderr, "spawning event thread error\n");
exit(0);
}
if (spawnRecvDataThread())
{
fprintf(stderr, "spawning response thread error\n");
exit(0);
}
................
................
................
return 0;
}
next reply other threads:[~2003-05-20 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-20 6:51 Lejanson C. Go [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-20 5:50 about posix threads Lejanson C. Go
2003-05-20 8:37 ` nanakos
2003-05-20 16:12 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EC9D087.3060804@hq.ntsp.nec.co.jp \
--to=lejanson@ntsp.nec.co.jp \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).