unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: 1.8 make check failing in popen.test
Date: Fri, 25 Aug 2006 11:16:07 +1000	[thread overview]
Message-ID: <87k64x8vjc.fsf@zip.com.au> (raw)
In-Reply-To: <87u045jzmz.fsf@raven.defaultvalue.org> (Rob Browning's message of "Mon, 21 Aug 2006 19:03:00 -0700")

Rob Browning <rlb@defaultvalue.org> writes:
>
>>From the output of ps auxf, it looks like the child is probably one of
> these zombies.  There are several zombie sh children:
>
>       \_ [sh] <defunct>
>       \_ [sh] <defunct>
>       \_ [sh] <defunct>
>       \_ [lt-guile] <defunct>
>       \_ [lt-guile] <defunct>

Actually, I see the signalling pipe is left in the parent, so if the
child has printed nothing it could hang.  Obviously there's something
wrong if the child doesn't print what's expected, but the change below
should at least cause an error instead of a hang in that case.


  ;; After the child closes stdin (which it indicates here by writing
  ;; "closed" to stderr), the parent should see a broken pipe.  We setup to
  ;; see this as EPIPE (rather than SIGPIPE).  In Guile 1.6.4 and earlier a
  ;; duplicate of stdin existed in the child, preventing the broken pipe
  ;; occurring.
  (pass-if "no duplicate"
    (with-epipe
     (lambda ()
       (let* ((pair (pipe))
	      (port (with-error-to-port (cdr pair)
		      (lambda ()
			(open-output-pipe
			 "exec 0</dev/null; echo closed 1>&2; exec 2>/dev/null; sleep 999")))))
	 (close-port (cdr pair))   ;; write side
	 (and (char? (read-char (car pair))) ;; wait for child to do its thing
	      (catch 'system-error
		(lambda ()
		  (write-char #\x port)
		  (force-output port)
		  #f)
		(lambda (key name fmt args errno-list)
		  (= (car errno-list) EPIPE))))))))


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2006-08-25  1:16 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-23  8:37 1.8 make check failing in popen.test Rob Browning
2006-07-23 22:36 ` Kevin Ryde
2006-07-23 23:12   ` Rob Browning
2006-07-24  7:25     ` Ludovic Courtès
2006-07-30  1:59       ` Rob Browning
2006-08-15  8:35 ` Rob Browning
2006-08-15 23:13   ` Kevin Ryde
2006-08-16  1:18     ` Rob Browning
2006-08-16 23:26       ` Kevin Ryde
2006-08-18  3:01         ` Rob Browning
2006-08-21 23:38           ` Kevin Ryde
2006-08-22  2:03             ` Rob Browning
2006-08-25  1:16               ` Kevin Ryde [this message]
2006-08-25  2:39                 ` Rob Browning
2006-08-27 20:06                   ` Rob Browning
2006-08-27 20:22                     ` Rob Browning
2006-08-30  7:50             ` Rob Browning
2006-08-31  0:24               ` Kevin Ryde
2006-08-31  6:28                 ` Rob Browning
2006-09-04  2:45                   ` Rob Browning
2006-09-07 20:46                     ` Kevin Ryde
2006-09-08  2:45                       ` Rob Browning
2006-09-08 23:05                         ` Kevin Ryde
2006-09-09 12:52                           ` Marius Vollmer
2006-09-09 16:39                             ` Rob Browning
2006-09-10 16:24                               ` Rob Browning
2006-09-11  1:16                                 ` Rob Browning
2006-09-11  6:40                                   ` Neil Jerram
2006-09-11 15:57                                     ` Rob Browning
2006-09-11 17:40                                       ` Neil Jerram

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=87k64x8vjc.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-devel@gnu.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).