diff -uN otherlibs/win32unix.orig/Makefile.nt otherlibs/win32unix/Makefile.nt --- otherlibs/win32unix.orig/Makefile.nt 2004-05-30 10:17:06.000000000 +0200 +++ otherlibs/win32unix/Makefile.nt 2004-11-11 11:34:58.000000000 +0100 @@ -30,7 +30,7 @@ mkdir.c open.c pipe.c read.c rename.c \ select.c sendrecv.c \ shutdown.c sleep.c socket.c sockopt.c startup.c stat.c \ - system.c unixsupport.c windir.c winwait.c write.c + system.c unixsupport.c windir.c winwait.c winkill.c write.c # Files from the ../unix directory UNIX_FILES = access.c addrofstr.c chdir.c chmod.c cst2constr.c \ diff -uN otherlibs/win32unix.orig/unix.ml otherlibs/win32unix/unix.ml --- otherlibs/win32unix.orig/unix.ml 2004-06-22 19:18:50.000000000 +0200 +++ otherlibs/win32unix/unix.ml 2004-11-11 11:40:45.000000000 +0100 @@ -385,7 +385,8 @@ | F_TRLOCK external lockf : file_descr -> lock_command -> int -> unit = "unix_lockf" -let kill pid signo = invalid_arg "Unix.kill not implemented" +external kill : int -> int -> unit = "win_killpid" + type sigprocmask_command = SIG_SETMASK | SIG_BLOCK | SIG_UNBLOCK let sigprocmask cmd sigs = invalid_arg "Unix.sigprocmask not implemented" let sigpending () = invalid_arg "Unix.sigpending not implemented" diff -uN otherlibs/win32unix.orig/winkill.c otherlibs/win32unix/winkill.c --- otherlibs/win32unix.orig/winkill.c 1970-01-01 01:00:00.000000000 +0100 +++ otherlibs/win32unix/winkill.c 2004-11-11 11:33:50.000000000 +0100 @@ -0,0 +1,33 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Pascal Cuoq and Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1996 Institut National de Recherche en Informatique et */ +/* en Automatique. All rights reserved. This file is distributed */ +/* under the terms of the GNU Library General Public License, with */ +/* the special exception on linking described in file ../../LICENSE. */ +/* */ +/***********************************************************************/ + +/* $Id: winwait.c,v 1.14 2002/06/07 09:49:41 xleroy Exp $ */ + +#include +#include +#include +#include +#include "unixsupport.h" +#include + +CAMLprim value win_killpid(value vpid_req, value sig) +{ + /* we ignore the passed signal */ + HANDLE pid_req = (HANDLE) Long_val(vpid_req); + + if (! TerminateProcess(pid_req, 0x80)) { + win32_maperr(GetLastError()); + uerror("killpid", Nothing); + } + return Val_unit; +}