From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA19717; Mon, 7 May 2001 10:58:42 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA20039 for ; Mon, 7 May 2001 10:58:41 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f478wdf27839; Mon, 7 May 2001 10:58:39 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id KAA12337; Mon, 7 May 2001 10:58:39 +0200 Date: Mon, 7 May 2001 10:58:39 +0200 From: Daniel de Rauglaudre To: Mattias Waldau Cc: caml-list@inria.fr Subject: Re: [Caml-list] Wserver: Values of global variables lost Message-ID: <20010507105839.A12332@verdot.inria.fr> References: <20010503153234.A28259@caddr.com> <4.3.2.7.2.20010504125129.00e25990@shell16.ba.best.com> <01050620563901.11893@fforum.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: <01050620563901.11893@fforum.se>; from mattias.waldau@abc.se on Sun, May 06, 2001 at 08:56:48PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Sun, May 06, 2001 at 08:56:48PM +0200, Mattias Waldau wrote: > I am trying to use wserver, and create a simple ocaml-based webserver. > > I am using it locally, and I assumed that the global variables in my ocaml > would be kept during the interaction with the user. > > However, in the following program sofar is always ref "". It is because a new process is launched at every request. Wserver uses the Unix.fork function which creates a separated process, the global variables are therefore not shared. It would have worked if Wserver had used the threads but it it not implemented like that. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr