Re: how to terminate an external program after timeout?

2010-09-09 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/9/10 05:35 , Christian Maeder wrote: > System.Process.readProcessWithExitCode "metis" filename "" If all else fails, there's: sh -c '(sleep 120; kill -TERM $$ >/dev/null 2>&1) & exec metis' which makes the shell deal with timeouts for you. (A

Re: how to terminate an external program after timeout?

2010-09-09 Thread Christian Maeder
David Peixotto schrieb: > On Sep 9, 2010, at 6:37 AM, Simon Marlow wrote: > >> On 09/09/2010 10:39, Christian Maeder wrote: >>> Christian Maeder schrieb: Hi, we call from our haskell application the metis prover via System.Process.readProcessWithExitCode "metis" filename

Re: HEAD: Deterioration in ByteString I/O

2010-09-09 Thread Simon Marlow
On 09/09/2010 15:08, Daniel Fischer wrote: On Thursday 09 September 2010 13:19:23, Simon Marlow wrote: I think I've found the problem, GHC.IO.Handle.Text: bufReadNBEmpty :: Handle__ -> Buffer Word8 -> Ptr Word8 -> Int -> Int -> IO Int bufReadNBEmpty h...@handle__{..} b.

Re: how to terminate an external program after timeout?

2010-09-09 Thread David Peixotto
On Sep 9, 2010, at 6:37 AM, Simon Marlow wrote: > On 09/09/2010 10:39, Christian Maeder wrote: >> Christian Maeder schrieb: >>> Hi, >>> >>> we call from our haskell application the metis prover via >>> >>> System.Process.readProcessWithExitCode "metis" filename "" >>> >>> However, we are not a

Re: HEAD: Deterioration in ByteString I/O

2010-09-09 Thread Daniel Fischer
On Thursday 09 September 2010 13:19:23, Simon Marlow wrote: > I think I've found the problem, GHC.IO.Handle.Text: > > bufReadNBEmpty :: Handle__ -> Buffer Word8 -> Ptr Word8 -> Int -> Int -> > IO Int > bufReadNBEmpty   h...@handle__{..} >                   b...@buffer{ bufRaw=raw, bufR=w, bufL=r, b

Re: how to terminate an external program after timeout?

2010-09-09 Thread Simon Marlow
On 09/09/2010 10:39, Christian Maeder wrote: Christian Maeder schrieb: Hi, we call from our haskell application the metis prover via System.Process.readProcessWithExitCode "metis" filename "" However, we are not able to get rid of this process if metis does not terminate by itself. In parti

Re: HEAD: Deterioration in ByteString I/O

2010-09-09 Thread Simon Marlow
On 09/09/2010 00:28, Daniel Fischer wrote: On Wednesday 08 September 2010 23:55:35, Don Stewart wrote: simonpj: |> ghc-6.12.3: |>89,330,672 bytes allocated in the heap |>15,092 bytes copied during GC |>35,980 bytes maximum residency (1 sample(s)) |>2

Re: alignment and the evil gc assertion failure

2010-09-09 Thread Simon Marlow
On 06/09/2010 19:03, Evan Laforge wrote: So a long time ago (I think when 6.10 first came out, the problem didn't happen with the previous version, and I think 6.10 changed how the FFI used alignment) I filed a ghc ticket about a gc assertion failure. Unfortunately it was so hard to reproduce an

RE: Type Families and defaults

2010-09-09 Thread Simon Peyton-Jones
| > I'm afraid I didn't understand your questions well enough to answer them. | | My question is, why does this type check: It's hard for me to answer a question like that! To explain why something type checks I'd have to show every constraint and how it is solved. I think you have something

Re: how to terminate an external program after timeout?

2010-09-09 Thread Christian Maeder
Christian Maeder schrieb: > Hi, > > we call from our haskell application the metis prover via > > System.Process.readProcessWithExitCode "metis" filename "" > > However, we are not able to get rid of this process if metis does not > terminate by itself. In particular, wrapping this call into a

how to terminate an external program after timeout?

2010-09-09 Thread Christian Maeder
Hi, we call from our haskell application the metis prover via System.Process.readProcessWithExitCode "metis" filename "" However, we are not able to get rid of this process if metis does not terminate by itself. In particular, wrapping this call into a System.Timeout.timeout does not work. Any

Re: SIGALRM, SIGVTALRM, and third party libraries

2010-09-09 Thread Simon Marlow
On 08/09/2010 15:57, Edward Z. Yang wrote: Excerpts from Simon Marlow's message of Wed Sep 08 03:40:42 -0400 2010: Maybe. As a first step I think we could just document what happens when a call is interrupted (pthread_cancel() on POSIX, ??? on Windows) and let the user handle it. Is there even