From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Mattias Waldau <mattias.waldau@abc.se>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Wserver: Values of global variables lost
Date: Mon, 7 May 2001 10:58:39 +0200 [thread overview]
Message-ID: <20010507105839.A12332@verdot.inria.fr> (raw)
In-Reply-To: <01050620563901.11893@fforum.se>; from mattias.waldau@abc.se on Sun, May 06, 2001 at 08:56:48PM +0200
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
next prev parent reply other threads:[~2001-05-07 8:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-03 22:32 [Caml-list] printable digest strings Miles Egan
2001-05-04 9:15 ` Hendrik Tews
2001-05-04 9:37 ` Xavier Leroy
2001-05-04 14:00 ` Miles Egan
2001-05-04 14:50 ` Brian Rogoff
2001-05-04 20:27 ` Chris Hecker
2001-05-04 22:54 ` Miles Egan
2001-05-06 18:56 ` [Caml-list] Wserver: Values of global variables lost Mattias Waldau
2001-05-07 8:58 ` Daniel de Rauglaudre [this message]
2001-05-07 17:00 ` Mattias Waldau
2001-05-07 18:16 ` Daniel de Rauglaudre
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=20010507105839.A12332@verdot.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--cc=caml-list@inria.fr \
--cc=mattias.waldau@abc.se \
/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