Re: [Haskell-cafe] System.Exit

2007-07-05 Thread Stefan O'Rear
On Thu, Jul 05, 2007 at 02:04:32PM +1000, Thomas Conway wrote: Hi All, Can anyone tell me what System.Exit.exitWith is actually supposed to do? As far as I can tell, it seems to be a synonym of (return ()). Okay, I'll stop being provocative and try and be helpful. So I have a web server,

Re: [Haskell-cafe] System.Exit

2007-07-05 Thread Tomasz Zielonka
On Wed, Jul 04, 2007 at 11:16:20PM -0700, Stefan O'Rear wrote: The documentation says: | Computation exitWith code throws ExitException code. Normally this | terminates the program, returning code to the program's caller. Before | the program terminates, any open or semi-closed handles are

Re: [Haskell-cafe] System.Exit

2007-07-05 Thread Thomas Conway
FWIW, I implemented the STM based solution, and it works a treat. It's less of a hack than the version where I got the child thread to send a SIGINT. ;-) T. -- Dr Thomas Conway [EMAIL PROTECTED] Silence is the perfectest herald of joy: I were but little happy, if I could say how much.

[Haskell-cafe] System.Exit

2007-07-04 Thread Thomas Conway
Hi All, Can anyone tell me what System.Exit.exitWith is actually supposed to do? As far as I can tell, it seems to be a synonym of (return ()). Okay, I'll stop being provocative and try and be helpful. So I have a web server, which like the one in The Literature(TM), essentially has a main

Re: [Haskell-cafe] System.Exit

2007-07-04 Thread Brandon S. Allbery KF8NH
On Jul 5, 2007, at 0:04 , Thomas Conway wrote: quitHandler sok addr = do tidyUpEverything sendOkResponse sok sClose sok System.Exit.exitWith ExitSuccess All nice and simple. All except one detail: it doesn't actually work. It prints exit: ExitSuccess but the doit loop