Browse thread
Patch: kill() undex win32
-
Wesley W. Terpstra
-
Wesley W. Terpstra
-
Christopher A. Watford
- Wesley W. Terpstra
-
Christopher A. Watford
-
Wesley W. Terpstra
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-11-12 (01:07) |
From: | Wesley W. Terpstra <terpstra@g...> |
Subject: | Re: [Caml-list] Re: Patch: kill() undex win32 |
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