changeset 6545:7cf7e248cb71

[project @ 2007-04-19 16:53:15 by jwe]
author jwe
date Thu, 19 Apr 2007 16:53:15 +0000
parents 43fc02d57862
children 44a4f68fbd76
files src/ChangeLog src/syscalls.cc
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Apr 19 15:27:34 2007 +0000
+++ b/src/ChangeLog	Thu Apr 19 16:53:15 2007 +0000
@@ -1,3 +1,8 @@
+2007-04-19  Daniel J. Sebald  <daniel.sebald@ieee.org>
+
+	* syscalls.cc: Fix popen2 test to stop trying after 100 times
+	throught the loop.
+
 2007-04-16  Geordie McBain  <geordie.mcbain@aeromech.usyd.edu.au>
 
 	* ov-fcn-inline.cc (Fargnames): Doc fix.
--- a/src/syscalls.cc	Thu Apr 19 15:27:34 2007 +0000
+++ b/src/syscalls.cc	Thu Apr 19 16:53:15 2007 +0000
@@ -363,6 +363,7 @@
 %!  done = false;
 %!  str = {};
 %!  idx = 0;
+%!  errs = 0;
 %!  do
 %!     if (!isunix())
 %!       errno (0);
@@ -374,10 +375,13 @@
 %!     elseif (errno () == EAGAIN)
 %!       fclear (out);
 %!       sleep (0.1);
+%!       if (++errs == 100)
+%!         done = true;
+%!       endif
 %!     else
 %!       done = true;
 %!     endif
-%!   until (done)
+%!  until (done)
 %!  fclose (out);
 %!  if (isunix())
 %!    assert(str,{"these\n","strings\n","some\n","are\n"})