summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-10-24 13:16:40 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-10-24 13:16:40 -0400
commita40abb9f7566aa1e74d6ae9d7baf73ec904b1e22 (patch)
tree524c6cfca87a2567901661136335be292c545b1c
parent0eee7a2eb5f3459dbfc9c5b32757e5c866092e6b (diff)
temporary hack to get windows build working
Code for terminating processes on Windows is not linking anymore; made a warning be displayed instead. This breaks restarting the assistant and git annex assistant --stop. I hope to see the code added to the Win32 library, where it should fit better and should avoid whatever problem is making the linker not like it when included in git-annex. I opened an issue requesting its addition, here: https://github.com/haskell/win32/issues/91 This commit was sponsored by Thomas Hochstein on Patreon.
-rw-r--r--CHANGELOG10
-rw-r--r--Utility/WinProcess.hs17
2 files changed, 11 insertions, 16 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f9399c4c9..612f65515 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,13 @@
+git-annex (6.20171019) UNRELEASED; urgency=medium
+
+ * Windows build fixed, and changed to use stack for more relaiable build
+ environment.
+ * Code for terminating processes on Windows is not linking anymore;
+ made a warning be displayed instead. This breaks restarting the
+ assistant and git annex assistant --stop.
+
+ -- Joey Hess <id@joeyh.name> Tue, 24 Oct 2017 13:12:52 -0400
+
git-annex (6.20171018) unstable; urgency=medium
* add: Replace work tree file atomically on systems supporting hard
diff --git a/Utility/WinProcess.hs b/Utility/WinProcess.hs
index 31f6cfc69..4277931c0 100644
--- a/Utility/WinProcess.hs
+++ b/Utility/WinProcess.hs
@@ -5,24 +5,9 @@
- License: BSD-2-clause
-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-
module Utility.WinProcess where
import Utility.PID
-import System.Win32.Process
-import Control.Exception (bracket)
-import Control.Monad
-
terminatePID :: PID -> IO ()
-terminatePID p = bracket
- (openProcess pROCESS_TERMINATE False p)
- (void . c_closeProcess)
- (\h -> void $ c_TerminateProcess h 1)
-
-foreign import ccall unsafe "windows.h TerminateProcess"
- c_TerminateProcess :: ProcessHandle -> Int -> IO Int
-
-foreign import ccall unsafe "windows.h CloseHandle"
- c_closeProcess :: ProcessHandle -> IO Bool
+terminatePID p = warning "terminating processes on windows is not currently working"