texinfo-commits
[Top][All Lists]
Advanced

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

[5832] don't look for started process indefinitely


From: Gavin D. Smith
Subject: [5832] don't look for started process indefinitely
Date: Thu, 18 Sep 2014 15:02:13 +0000

Revision: 5832
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5832
Author:   gavin
Date:     2014-09-18 15:02:12 +0000 (Thu, 18 Sep 2014)
Log Message:
-----------
don't look for started process indefinitely

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/t/Init-inter.inc

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-09-18 14:10:28 UTC (rev 5831)
+++ trunk/ChangeLog     2014-09-18 15:02:12 UTC (rev 5832)
@@ -6,6 +6,8 @@
        * info/display.c (display_update_window_1): Turn off standout mode
        if we are still in it by the time we get to the bottom of the window.
 
+       * info/t/Init-inter.inc: Don't hang if the process doesn't appear.
+
 2014-09-16  Gavin Smith  <address@hidden>
 
        * info/indices.c (info_index_apropos): Mark apropos node with

Modified: trunk/info/t/Init-inter.inc
===================================================================
--- trunk/info/t/Init-inter.inc 2014-09-18 14:10:28 UTC (rev 5831)
+++ trunk/info/t/Init-inter.inc 2014-09-18 15:02:12 UTC (rev 5832)
@@ -54,7 +54,9 @@
   # command.
   echo 'Fetching PID of ginfo process under test...' >&2
   GINFO_PID=
-  while :
+  # Try 3 times and then give up.  The process may never have started, have
+  # started under a different name, or have already exited.
+  for i in 1 2 3
   do
     GINFO_PID=$( pgrep -P $SUBSHELL $GINFO_NAME ; \
        test $? -eq 0 -o $? -eq 1 || exit 99 )
@@ -78,6 +80,7 @@
     test "$GINFO_PID" = "" || break
     sleep 1 # Give subshell time to spawn ginfo process
   done
+  test "$GINFO_PID" = "" && GINFO_PID=unknown
   echo ...$GINFO_PID >&2
 }
 




reply via email to

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