unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@giblet.glug.org>
Subject: Re: open-output-pipe problem
Date: Wed, 07 Aug 2002 20:20:48 -0700	[thread overview]
Message-ID: <E17cdqy-0000Ni-00@giblet> (raw)
In-Reply-To: <E17aMJy-00066S-00@giblet> (message from Thien-Thi Nguyen on Thu, 01 Aug 2002 13:13:18 -0700)

   From: Thien-Thi Nguyen <ttn@giblet.glug.org>
   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  <ghouston@arglist.com>

	* 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  <ghouston@arglist.com>

	* 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...

thi

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


  reply	other threads:[~2002-08-08  3:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-01 20:13 open-output-pipe problem Thien-Thi Nguyen
2002-08-08  3:20 ` Thien-Thi Nguyen [this message]
2002-08-09  1:08   ` Thien-Thi Nguyen
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13 13:56 Satoru Takabayashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17cdqy-0000Ni-00@giblet \
    --to=ttn@giblet.glug.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).