Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Wesley W. Terpstra" <terpstra@gkec.tu-darmstadt.de>
To: "Christopher A. Watford" <christopher.watford@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Patch: kill() undex win32
Date: Fri, 12 Nov 2004 02:07:12 +0100	[thread overview]
Message-ID: <20041112010712.GA3886@muffin> (raw)
In-Reply-To: <8008871f04111115426eb9c613@mail.gmail.com>

On Thu, Nov 11, 2004 at 06:42:04PM -0500, Christopher A. Watford wrote:
> Might I ask why 0x80 is being returned as the exit code instead of
> something from winbase.h (auto from windows.h) like:
> 
> STATUS_CONTROL_C_EXIT

I didn't have any particular reason for choosing that value. If you think
that STATUS_CONTROL_C_EXIT makes more sense under windows, then I'm all for
that (esp. since you knew it existed and thus more than I).

Mostly I didn't want it to be near 'user' returnable values like 0,1,2,...
and also not near syscall return values -1,... 0x80 seemed to be a good
middle ground. ;) Another suggestion might be to use the signal number
itself for the return code.

At least for me the return code is irrelevant; I just need to be able to
kill my child processes when the ocaml program quits abnormally.

> Which, while it is not the case that exactly is happening, it does let
> the user know with a fairly standard method as to what happened to
> their thread/process.

I'd like to point out that this patch can only work for child processes
created from the ocaml program. So, I think it's unlikely that there is
a user involved to interpret the CTRL-C, or even be concerned that the
process vanished.

PS. Did you try the patch? Does it work?

-- 
Wesley W. Terpstra


      reply	other threads:[~2004-11-12  1:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 10:48 Wesley W. Terpstra
2004-11-11 12:54 ` Wesley W. Terpstra
2004-11-11 23:42   ` [Caml-list] " Christopher A. Watford
2004-11-12  1:07     ` Wesley W. Terpstra [this message]

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=20041112010712.GA3886@muffin \
    --to=terpstra@gkec.tu-darmstadt.de \
    --cc=caml-list@inria.fr \
    --cc=christopher.watford@gmail.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