[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open-output-pipe problem

From: Thien-Thi Nguyen
Subject: Re: open-output-pipe problem
Date: Wed, 07 Aug 2002 20:20:48 -0700

   From: Thien-Thi Nguyen <address@hidden>
   Date: Thu, 01 Aug 2002 13:13:18 -0700

   will let you know what i find.

i found that for the simple test case given, reverting popen.scm to the
one provided w/ guile-1.3.4 makes it work.  i believe the relevant entry
for the 1.3.4 - 1.4.1 change is:

   2000-04-10  Gary Houston  <address@hidden>

        * popen.scm (open-process): after forking, close all ports except
        the end of the pipe to the parent.  otherwise move->fdes and
        the exec'd program and the exit handlers can interfere with file
        descriptors still in use in parent ports.

this seems to address a legitimate concern.  in HEAD (and presumably
1.6.x although i haven't checked) there is also:

   2000-11-06  Gary Houston  <address@hidden>

        * popen.scm (open-process): bug fix: don't use
        close-all-ports-except to close ports in the child process, since
        it causes port buffers to be flushed.  they may be flushed again
        in the parent, causing duplicate output.  use a more elaborate
        method for setting up the child descriptors (thanks to David
        Pirotte for the bug report).
        standard file descriptors 0, 1, 2 in the child process
        are now set up from current-input-port etc., where possible.

so it looks like simply reverting to 1.3.4 popen.scm would not be
acceptable; 1.4.x captures a part-way fix that needs to be pushed
forward to completion.  i have experimented w/ back-porting the new
popen.scm (including associated support in libguile) w/o success, so
there is more investigation to do to see what else is going on.  by the
time this is fixed i'll know a lot more about how ports are done in
guile, that's for sure...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]