fix race with getStore() (#45)
by calling it once before starting the server closes: #44
This commit is contained in:
@@ -341,6 +341,8 @@ main = do
|
||||
options@Options{ priority, timeout, verbosity } <- do
|
||||
Options.execParser Options.parserInfo
|
||||
|
||||
Nix.initStore
|
||||
|
||||
storeDirectory <- Nix.getStoreDir
|
||||
|
||||
secretKeyFile <- Environment.lookupEnv "NIX_SECRET_KEY_FILE"
|
||||
|
||||
@@ -34,6 +34,8 @@ import qualified Foreign
|
||||
|
||||
#include "nix.hh"
|
||||
|
||||
foreign import ccall "initStore" initStore :: IO ()
|
||||
|
||||
foreign import ccall "freeString" freeString :: Ptr String_ -> IO ()
|
||||
|
||||
data String_ = String_ { data_ :: Ptr CChar, size :: CSize }
|
||||
|
||||
Reference in New Issue
Block a user