summaryrefslogtreecommitdiff
path: root/iserv/proxy-src
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2017-05-11 18:13:28 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2017-05-11 18:31:43 +0800
commit83dcaa8c1e25e5d73c0010029ade30713c0e1696 (patch)
treea7dd93eb8bebf8f8f622d4d6db50069e9f96ff37 /iserv/proxy-src
parent5ddb307edf15c4d86e5c35c4063ec967424e19f2 (diff)
downloadhaskell-83dcaa8c1e25e5d73c0010029ade30713c0e1696.tar.gz
[iserv] fix loadDLL
When we load non absolute pathed .so's this usually implies that we expect the system to have them in place already, and hence we should not need to ship them. Without the absolute path to the library, we are also unable to open and send said library. Thus we'll do library shipping only for libraries with absolute paths. Reviewers: austin, bgamari, simonmar Reviewed By: simonmar Subscribers: simonmar, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3469
Diffstat (limited to 'iserv/proxy-src')
-rw-r--r--iserv/proxy-src/Remote.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/iserv/proxy-src/Remote.hs b/iserv/proxy-src/Remote.hs
index 481d6acf7d..c91b2d08c6 100644
--- a/iserv/proxy-src/Remote.hs
+++ b/iserv/proxy-src/Remote.hs
@@ -59,6 +59,8 @@ import System.Environment
import System.Exit
import Text.Printf
import GHC.Fingerprint (getFileHash)
+import System.Directory
+import System.FilePath (isAbsolute)
import Data.Binary
import qualified Data.ByteString as BS
@@ -68,7 +70,7 @@ dieWithUsage = do
prog <- getProgName
die $ prog ++ ": " ++ msg
where
-#ifdef WINDOWS
+#if defined(WINDOWS)
msg = "usage: iserv <write-handle> <read-handle> <slave ip> [-v]"
#else
msg = "usage: iserv <write-fd> <read-fd> <slave ip> [-v]"
@@ -231,6 +233,10 @@ proxy verbose local remote = loop
resp <- fwdLoadCall verbose local remote msg'
reply resp
loop
+ LoadDLL path | isAbsolute path -> do
+ resp <- fwdLoadCall verbose local remote msg'
+ reply resp
+ loop
Shutdown{} -> fwdCall msg' >> return ()
_other -> fwdCall msg' >>= reply >> loop