Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2005 02:05:44 +0200
From:      Joerg Sonnenberger <joerg@britannica.bec.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Fork mystries....
Message-ID:  <20050604000544.GA31318@britannica.bec.de>
In-Reply-To: <3727392705060316555071c4ad@mail.gmail.com>
References:  <3727392705060316555071c4ad@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 03, 2005 at 07:55:29PM -0400, Aziz Kezzou wrote:
> It's probably not the right mailing list to ask but I am really
> surprised about global variable sharing in a multithreaded C
> application. If I remember well my multithreading course global
> variables are shared between threads, right ?

fork() creates new processes, not new threads. Check pthread_create
for the latter.

Joerg



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