From 4a2ac0623c3dabb2c8b9d38c27b837dcb2c7fe4e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 23 Feb 2011 21:04:26 +0100 Subject: [PATCH] open-pipe* pumps pipes guardian * module/ice-9/popen.scm (open-pipe*): Hack around the lack of an after-gc hook, and pump the pipes guardian here in the procedure that adds to the guardian. --- module/ice-9/popen.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/ice-9/popen.scm b/module/ice-9/popen.scm index c5b02f7f1..5445ecb6b 100644 --- a/module/ice-9/popen.scm +++ b/module/ice-9/popen.scm @@ -1,6 +1,6 @@ ;; popen emulation, for non-stdio based ports. -;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006, 2010 Free Software Foundation, Inc. +;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006, 2010, 2011 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -139,6 +139,10 @@ A port to the process (based on pipes) is created and returned. @var{modes} specifies whether an input, an output or an input-output port to the process is created: it should be the value of @code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}." + + ;; Until we get GC hooks working again, pump the guardian here. + (reap-pipes) + (let* ((port/pid (apply open-process mode command args)) (port (car port/pid))) (pipe-guardian port)