diff src/main.mlton.sml @ 1830:d636d33fd8a2

Fix broken implementation of 'urweb daemon stop'
author Austin Seipp <mad.one@gmail.com>
date Wed, 28 Nov 2012 11:39:38 -0500
parents b8fa7441e637
children c3119c263bd3
line wrap: on
line diff
--- a/src/main.mlton.sml	Mon Oct 22 01:49:22 2012 +0400
+++ b/src/main.mlton.sml	Wed Nov 28 11:39:38 2012 -0500
@@ -300,7 +300,8 @@
                       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 @@
                  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)