Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2002 21:48:38 +0300 (MSK)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        dwmalone@FreeBSD.ORG
Cc:        yxpan@yahoo.com, <freebsd-bugs@FreeBSD.ORG>
Subject:   Re: i386/34536: accept() blocks other threads
Message-ID:  <20020207213918.V85900-100000@news1.macomnet.ru>
In-Reply-To: <200202071701.g17H1Zt83698@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello David,

On 09:01-0800, Feb 7, 2002, dwmalone@FreeBSD.ORG wrote:

> Synopsis: accept() blocks other threads
>
> State-Changed-From-To: closed->open
> State-Changed-By: dwmalone
> State-Changed-When: Thu Feb 7 08:48:18 PST 2002
> State-Changed-Why:
> I think there is a little more to this PR...
>
> I've done a little more experimentation, and I've found that the
> problem is the fact that your process forks. The must set up the
> descriptors correctly, but things are subtly different in the child.

I did not reproduce the problem on my -current. Will try on -stable
tomorrow.

> I don't know how posix threads and fork are supposed to interact.

AFAIU there are no any interactions between pthread(3) and fork(2) in
the code. Main thread forks once and after that creates srv() threads.

> Could someone who does know about posix threads say is expected if
> you fork? Should threading work in the child?

Yes, it should.

-- 
Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
phone: +7 (095) 796-9079, mailto:maxim@macomnet.ru



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020207213918.V85900-100000>