Changeset e1419f in git


Ignore:
Timestamp:
Nov 28, 2014, 1:57:27 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
f9b1126a5463b1a44a811debc3c623b3813acf01
Parents:
ba19a8a94da4931a7c4fb8ea6bc91256251c15ec
Message:
doc: example watchdog, ring-indep.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/general.lib

    rba19a8 re1419f  
    924924"
    925925{
    926   string rname=nameof(basering);
    927   def rsave=basering;
     926  if (defined(basering))
     927  {
     928    string rname=nameof(basering);
     929    def rsave=basering;
     930  }
    928931  if (defined(watchdog_rneu))
    929932  {
     
    942945    {
    943946      def result = read(l_fork);
    944       if (nameof(basering)!=rname)
    945       {
    946         def watchdog_rneu=basering;
    947         setring rsave;
    948         if (!defined(result))
     947      if (defined(rsave))
     948      {
     949        if (nameof(basering)!=rname)
    949950        {
    950           def result=fetch(watchdog_rneu,result);
     951          def watchdog_rneu=basering;
     952          setring rsave;
     953          if (!defined(result))
     954          {
     955            def result=fetch(watchdog_rneu,result);
     956          }
    951957        }
    952958      }
     
    975981example
    976982{ "EXAMPLE:"; echo=2;
    977   watchdog(1,"system(\"sh\",\"sleep 5\")");
    978   watchdog(10,"system(\"sh\",\"sleep 5\")");
     983  proc sleep(int s) {return(system("sh","sleep "+string(s)));}
     984  watchdog(1,"sleep(5)");
     985  watchdog(10,"sleep(5)");
    979986}
    980987///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.