[Haskell-cafe] executeFile failing on macosx

Thomas Schilling nominolo at googlemail.com
Sun May 16 19:41:14 EDT 2010


Works fine on 10.6.3.  If you run with +RTS -N2, though, you'll get
"forking not supported with +RTS -N<n> greater than 1"

The reason for this is that forking won't copy over the threads which
means that the Haskell IO manager stops working (you'd have to somehow
reinitialise the RTS while leaving heap and runtime stacks in tact --
very tricky).

I'm using http://hackage.haskell.org/package/process to run external
processes.  I haven't had any problems with it.

On 17 May 2010 00:06, David Powell <david at drp.id.au> wrote:
>
> On Mon, May 17, 2010 at 1:33 AM, Bulat Ziganshin <bulat.ziganshin at gmail.com>
> wrote:
>>
>> Hello David,
>>
>> Sunday, May 16, 2010, 7:18:29 PM, you wrote:
>>
>> > "executeFile" is failing for me on Mac OS X 10.5.8, with ghc 6.12.1
>> > when compiling with "-threaded".  Compiling without -threaded, or
>> > running on linux is fine.
>> >>  forkProcess $ executeFile "/bin/echo" False ["Ok"] Nothing
>>
>> afair, forkProcess and -threaded shouldn't work together on any Unix.
>> can you try forkIO or forkOS instead?
>>
>
> Hi Bulat,
>
> Both, forkIO and forkOS fail in the same way for me with -threaded.  I
> believe this is because macosx requires the process to only have a single
> thread when doing an execv(), which I thought was the purpose of
> forkProcess?
>
> Cheers,
>
> -- David
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>



-- 
Push the envelope.  Watch it bend.


More information about the Haskell-Cafe mailing list