On 1/15/07, Robin Lee Powell <[EMAIL PROTECTED]> wrote:
On Mon, Jan 15, 2007 at 08:16:58AM +0100, felix winkelmann wrote:
> On 1/14/07, Robin Lee Powell <[EMAIL PROTECTED]> wrote:
> >
> >That made me think that doing a "wait" on the process *is*
> >behaviour I want, and I should do that.  However, process-wait
> >throws an error if the process has already exited, and I can't
> >seem to trap it.  I tried:
> >
> >(condition-case (process-wait pid) (var () #t))
> >
>
> This should work. Are you running this interactively?

If by interactively you mean with csi: nope; it's in the middle of a
very complex system with thousands of lines of code in at least 4
languages.  :-)


Oh, great! ;-)

Do you use with-exception-handler a lot? It has some subtle semantic
issues (handle.-exceptions is better, since an exception thrown in the
handler proc passed to with-exception-handler results in undefined
behaviour).

Does the process-wait inside an exception-handler work when run stand-alone
(without the rest of the code)?

Can you test whether the process is still alive, before doing the test
(perhaps by checking the /proc directory or through some other hacks)?


cheers,
felix


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to