summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2002-07-24 03:22:38 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2002-07-24 03:22:38 +0000
commit39c474b37fd74c99103d12738b5dde8104a9acff (patch)
treef31c6e9ef8e995df0ca0e049abd069ba4db9539b
parent794633663d1918a4954ecece421266b6aa282dd8 (diff)
works better under Windows ME
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--byterun/win32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/byterun/win32.c b/byterun/win32.c
index 047ba613f..225a5216a 100644
--- a/byterun/win32.c
+++ b/byterun/win32.c
@@ -345,7 +345,7 @@ int win32_system(char * cmdline)
#ifndef NATIVE_CODE
-/* Set up a new thread for control-C emulation */
+/* Set up a new thread for control-C emulation and termination */
void caml_signal_thread(void * lpParam)
{
@@ -359,15 +359,15 @@ void caml_signal_thread(void * lpParam)
char iobuf[2];
/* This shall always return a single character */
ret = ReadFile(h, iobuf, 1, &numread, NULL);
- if (!ret || numread != 1) sys_exit(Val_int(0));
+ if (!ret || numread != 1) sys_exit(Val_int(2));
switch (iobuf[0]) {
case 'C':
pending_signal = SIGINT;
something_to_do = 1;
break;
case 'T':
- exit(0);
- break;
+ raise(SIGTERM);
+ return;
}
}
}