mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Doug McNaught <doug@wireboard.com>
To: Sane_Purushottam@emc.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: fork and pthreads
Date: 16 Mar 2001 12:23:15 -0500	[thread overview]
Message-ID: <m3r8zxfx18.fsf@belphigor.mcnaught.org> (raw)
In-Reply-To: <93F527C91A6ED411AFE10050040665D0560664@corpusmx1.us.dg.com>
In-Reply-To: Sane_Purushottam@emc.com's message of "Fri, 16 Mar 2001 11:34:04 -0500"

Sane_Purushottam@emc.com writes:

> I am having a strange problem.
> 
> I have a big daemon program to which I am trying to add multi-threading.
> 
> At the begining, after some sanity check, this program does a double fork to
> create a deamon.
> 
> After that it listens for the client on the port. Whenever the client
> connects, it creates a new thread using
> pthread-create.
> 
> The problem is, the thread (main thread) calling pthread-create hangs
> indefinetely in __sigsuspend. The newly created thread however, runs
> normally to completion.

Just a guess--are you calling setsid() to establish a new session?
Omitting this *might* cause signal-delivery problems in pthreads.

-Doug

  reply	other threads:[~2001-03-16 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-16 16:34 Sane_Purushottam
2001-03-16 17:23 ` Doug McNaught [this message]
2001-03-16 17:52 ` Richard Guenther
2001-03-16 18:03   ` Craig Ruff
2001-03-16 18:09 Sane, Purushottam
2001-03-16 23:11 ` Laramie Leavitt

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=m3r8zxfx18.fsf@belphigor.mcnaught.org \
    --to=doug@wireboard.com \
    --cc=Sane_Purushottam@emc.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®