summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Austin Seipp <mad.one@gmail.com>2012-11-28 11:39:38 -0500
committerGravatar Austin Seipp <mad.one@gmail.com>2012-11-28 11:39:38 -0500
commit6c0457f866696cd6cad552e6bb8ca636d4c774d9 (patch)
treef3ad6ded48cfa61951f70e147bab1fe390093930 /src
parentfb74c5b8555331c1c37c1734c4aa02a99f207ac6 (diff)
Fix broken implementation of 'urweb daemon stop'
Diffstat (limited to 'src')
-rw-r--r--src/main.mlton.sml7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.mlton.sml b/src/main.mlton.sml
index 156cafe9..19022cb7 100644
--- a/src/main.mlton.sml
+++ b/src/main.mlton.sml
@@ -300,7 +300,8 @@ val () = case CommandLine.arguments () of
Socket.listen (listen, 1);
loop ()
end)
-
+ | ["daemon", "stop"] =>
+ (OS.FileSys.remove socket handle OS.SysErr _ => OS.Process.exit OS.Process.success)
| args =>
let
val sock = UnixSock.Strm.socket ()
@@ -340,6 +341,4 @@ val () = case CommandLine.arguments () of
else
(OS.FileSys.remove socket;
raise OS.SysErr ("", NONE))
- end handle OS.SysErr _ => case args of
- ["daemon", "stop"] => (OS.FileSys.remove socket handle OS.SysErr _ => ())
- | _ => OS.Process.exit (oneRun args)
+ end handle OS.SysErr _ => OS.Process.exit (oneRun args)