On 2013/05/23 09:17P, Peter Bex wrote:
> I've attached a patch that I *think* does the trick. [...] I'd love it
> if people could test this and provide feedback, because I'm pretty
> unsure whether this fix is the correct one.

Seems to work here -- at least, it solves the problem Bryan found and
doesn't cause any others AFAICS.

I did run into an unrelated issue while poking around with the patch,
after defining a new procedure `process-wait` for testing -- should
`process` use a "##sys" variant of `process-wait` in its definition? I
don't quite grok what the guarantees are w.r.t. user shadowing &
internal procedures in the units, but I think there are a few cases in
posix where an internal variant could (should?) be used.

Either way, the attached patch makes this specific change to `process`
since it bit me.

Evan
>From 7c835750032b5c073449dbb50dc7e7475e9587c3 Mon Sep 17 00:00:00 2001
From: Evan Hanson <ev...@foldling.org>
Date: Tue, 28 May 2013 16:18:54 +1200
Subject: [PATCH] use internal process-wait procedure in ##sys#process

---
 posixunix.scm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posixunix.scm b/posixunix.scm
index 7d8dcaf..88a88a0 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -1859,7 +1859,7 @@ EOF
             (lambda ()
               (vector-set! clsvec idx #t)
               (when (and (vector-ref clsvec idxa) (vector-ref clsvec idxb))
-                (receive [_ flg cod] (process-wait pid)
+                (receive [_ flg cod] (##sys#process-wait pid #f)
                   (unless flg
                     (##sys#signal-hook #:process-error loc
                       "abnormal process exit" pid cod)) ) ) ) )]
-- 
1.7.10.4

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to