From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: Erik de Castro Lopo <mle+ocaml@mega-nerd.com>
Cc: Caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Threads, Signals and Events
Date: Fri, 15 Feb 2008 07:47:21 +0100 [thread overview]
Message-ID: <47B53579.6070109@univ-savoie.fr> (raw)
In-Reply-To: <20080215091910.bb982431.mle+ocaml@mega-nerd.com>
[-- Attachment #1.1: Type: text/plain, Size: 1495 bytes --]
Erik de Castro Lopo a écrit :
> Hi all,
>
> I'm doing some systems programming where I need to use threads
> (standard threads, not cothreads), signals and events. The program
> has a couple of things to do:
>
> a) Start program X, do a wait on its pid and restart X if it dies
> and log information to syslog.
> b) Periodically run other system checks and log results to syslog.
> Certain types of system failures need to be communicated to
> program X so that it can modify its behaviour.
> c) Catch SIGHUP, and on reception, kill program X (send SIGHUP first
> and if that doesn't work SIGTERM and finally SIGKILL) and then
> exit itself.
>
> Since the system checks can take some time (mostly waiting for the
> kernel to do stuff rather than intensive processing) and program X
> needs to be restarted immediately if it dies, using threads seems
> to be an obvious solution.
>
>
Why not processes and fork ?
Christophe
--
Christophe Raffalli
Universite de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tel: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------
[-- Attachment #1.2: Christophe_Raffalli.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]
begin:vcard
fn:Christophe Raffalli
n:Raffalli;Christophe
org:LAMA (UMR 5127)
email;internet:christophe.raffalli@univ-savoie.fr
title;quoted-printable:Ma=C3=AEtre de conf=C3=A9rences
tel;work:+33 4 79 75 81 03
note:http://www.lama.univ-savoie.fr/~raffalli
x-mozilla-html:TRUE
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
next prev parent reply other threads:[~2008-02-15 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 22:19 Erik de Castro Lopo
2008-02-15 6:47 ` Christophe Raffalli [this message]
2008-02-15 8:18 ` [Caml-list] " SerP
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=47B53579.6070109@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=Caml-list@yquem.inria.fr \
--cc=mle+ocaml@mega-nerd.com \
/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