From f1560618fe37f7ec434e78cabd681802048cfb4c Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 16 Apr 2014 01:32:14 -0400 Subject: create nonexistent PEM files via external shell commands --- kiki.hs | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'kiki.hs') diff --git a/kiki.hs b/kiki.hs index 6cbf74d..1c6fa37 100644 --- a/kiki.hs +++ b/kiki.hs @@ -853,34 +853,6 @@ show_wip keyspec wkgrip db = do let nwb = maybe 0x80 CryptoCoins.secretByteFromName $ snd s putStrLn $ walletImportFormat nwb k --- | systemEnv --- This is like System.Process.system except that it lets you set --- some environment variables. -systemEnv _ "" = - ioException (ioeSetErrorString (mkIOError InvalidArgument "system" Nothing Nothing) "null command") -systemEnv vars cmd = do - env0 <- getEnvironment - let env1 = filter (isNothing . flip lookup vars . fst) env0 - env = vars ++ env1 - syncProcess "system" $ (shell cmd) {env=Just env} - where - -- This is a non-exported function from System.Process - syncProcess fun c = do - -- The POSIX version of system needs to do some manipulation of signal - -- handlers. Since we're going to be synchronously waiting for the child, - -- we want to ignore ^C in the parent, but handle it the default way - -- in the child (using SIG_DFL isn't really correct, it should be the - -- original signal handler, but the GHC RTS will have already set up - -- its own handler and we don't want to use that). - old_int <- installHandler sigINT Ignore Nothing - old_quit <- installHandler sigQUIT Ignore Nothing - (_,_,_,p) <- runGenProcess_ fun c - (Just defaultSignal) (Just defaultSignal) - r <- waitForProcess p - _ <- installHandler sigINT old_int Nothing - _ <- installHandler sigQUIT old_quit Nothing - return r - doExport doDecrypt (db,use_db) (fname,subspec,ms,cmd) = case ms of [_] -> export -- cgit v1.2.3