aboutsummaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-05-14 14:26:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-05-14 14:26:28 -0400
commit2b89de6562469c7bee6ae8e78205012ef43396dc (patch)
treead5804336698abe852551adc44704276fd6ae0cf /Assistant.hs
parent250035e1843bbcded9d45a45d043b6bfc8f1dc4f (diff)
setsid when running webapp in foreground too
This avoids ssh prompting for passwords on stdin, ever. It may also change other behavior of other programs, as there is no controlling terminal now. However, setsid was already done when running the assistant in daemon mode, so any behavior changes should not be really new.
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Assistant.hs b/Assistant.hs
index b5caceac2..5dd6a7ece 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -84,9 +84,7 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser =
fdToHandle =<< dup stdError
let undaemonize a = do
debugM desc $ "logging to " ++ logfile
- Utility.Daemon.lockPidFile pidfile
- Utility.LogFile.redirLog logfd
- a
+ Utility.Daemon.foreground logfd (Just pidfile) a
start undaemonize $
case startbrowser of
Nothing -> Nothing