# HG changeset patch # User Austin Seipp # Date 1354120778 18000 # Node ID d636d33fd8a2c9194704e5c822faa3f15670a48c # Parent aadfc1a138d8a04788a43767389deb77276c9066 Fix broken implementation of 'urweb daemon stop' diff -r aadfc1a138d8 -r d636d33fd8a2 src/main.mlton.sml --- 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)