On 14 August 2004 16:00, [EMAIL PROTECTED] wrote:
> 2. System.Posix.Signals does not export anything on my windows
> installation:
>
> Prelude System.Posix.Signals> :b System.Posix.Signals
>
> Prelude System.Posix.Signals>
>
> I wanted to include 'installHandler sigPIPE Ignore Nothing' (as
> mentioned in the documentation of the Network module) in my program
> to make it more portable. Perhaps 'installHandler' could be set to a
> constant 'return ()' on windows?
The System.Posix.Signals interface doesn't make any sense on Windows.
We could duplicate the whole interface with "do nothing" functionality,
but it's not clear that this is the right thing to do (the interface is
quite a bit more than just installHandler).
You want something like this:
#if __GLASGOW_HASKELL__ < 603
#include "config.h"
#else
#include "ghcconfig.h"
#endif
#ifdef mingw32_TARGET_OS
ignorePipeSignal = return ()
#else
import System.Posix
ignorePipeSignal = installHandler sigPIPE Ignore Nothing
#endif
Maybe it would make sense to include this in a library somewhere.
Cheers,
Simon
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users