Re: Is it safe to call getProcessExitCode more than once?

2004-10-27 Thread Glynn Clements
David Brown wrote: > > > Both [waitForProcess and getProcessExitCode] will throw > > > an exception if the process terminated on a signal. > > > > So if I terminate a process manually, I'll have to wait for > > the ExitCode to avoid a zombie process, and waiting for the > > ExitCode invariably

Re: Is it safe to call getProcessExitCode more than once?

2004-10-27 Thread Glynn Clements
Peter Simons wrote: > > Both [waitForProcess and getProcessExitCode] will throw > > an exception if the process terminated on a signal. > > So if I terminate a process manually, I'll have to wait for > the ExitCode to avoid a zombie process, and waiting for the > ExitCode invariably throws an

Re: Is it safe to call getProcessExitCode more than once?

2004-10-27 Thread David Brown
On Thu, Oct 28, 2004 at 06:27:42AM +0200, Peter Simons wrote: > Glynn Clements writes: > > > Both [waitForProcess and getProcessExitCode] will throw > > an exception if the process terminated on a signal. > > So if I terminate a process manually, I'll have to wait for > the ExitCode to avoid a

Re: Is it safe to call getProcessExitCode more than once?

2004-10-27 Thread Peter Simons
Glynn Clements writes: > Both [waitForProcess and getProcessExitCode] will throw > an exception if the process terminated on a signal. So if I terminate a process manually, I'll have to wait for the ExitCode to avoid a zombie process, and waiting for the ExitCode invariably throws an exception.

--make et al not in flags.sgml?

2004-10-27 Thread Ian Lynagh
Hi, Is there a reason --make and friends aren't in flags.sgml? This means they don't end up in the man page I generate. I've attached a patch that adds an entry for them, text mostly stolen from elsewhere in the docs. Thanks Ian --- ghc6-6.2.2.orig/ghc/docs/users_guide/flags.sgml +++ ghc6-6.2

RE: Process library and signals

2004-10-27 Thread Glynn Clements
Simon Marlow wrote: > So basically you're saying that if runProcess is to be used in a > system()-like way, that is the parent is going to wait synchronously for > the child, then the parent should be ignoring SIGQUIT/SIGINT. On the > other hand, if runProcess is going to be used in a popen()-li

RE: Process library and signals

2004-10-27 Thread Simon Marlow
My apologies if I misinterpreted your comments. There appear to be some use cases and conventions here that I'm not altogether familiar with. So basically you're saying that if runProcess is to be used in a system()-like way, that is the parent is going to wait synchronously for the child, then t

RE: runInteractiveProcess is broken

2004-10-27 Thread Simon Marlow
I can't repeat this, it works here: *Main> test1 ExitSuccess *Main> test2 Just ExitSuccess (after changing /usr/bin/sleep to /bin/sleep). The only thing I can think of is that you somehow have a SIGCHLD handler that calls wait(), but I don't see where that can be happening. GHC doesn't have any