D.2.2.16 watchdog
.................
Procedure from library general.lib (see general_lib).

Return:
Result of cmd, if the result can be computed in i seconds.
Otherwise the computation is interrupted after i seconds,
the string "Killed" is returned and the global variable
'watchdog_interrupt' is defined.

Note:
* the MP package must be enabled

* the current basering should not be watchdog_rneu, since
watchdog_rneu will be killed

* if there are variable names of the structure x(i) all
polynomials have to be put into eval(...) in order to be
interpreted correctly

* a second Singular process is started by this procedure

Example:
LIB "general.lib";
ring r=0,(x,y,z),dp;
poly f=x^30+y^30;
watchdog(1,"factorize(eval("+string(f)+"))");
==> [1]:
==>    _[1]=1
==>    _[2]=x16+x14y2-x10y6-x8y8-x6y10+x2y14+y16
==>    _[3]=x8-x6y2+x4y4-x2y6+y8
==>    _[4]=x4-x2y2+y4
==>    _[5]=x2+y2
==> [2]:
==>    1,1,1,1,1
watchdog(100,"factorize(eval("+string(f)+"))");
==> [1]:
==>    _[1]=1
==>    _[2]=x16+x14y2-x10y6-x8y8-x6y10+x2y14+y16
==>    _[3]=x8-x6y2+x4y4-x2y6+y8
==>    _[4]=x4-x2y2+y4
==>    _[5]=x2+y2
==> [2]:
==>    1,1,1,1,1

<font size="-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; User manual for <a href="http://www.singular.uni-kl.de/"><i>Singular</i></a> version 2-0-4, October 2002,
generated by <a href="http://www.gnu.org/software/texinfo/"><i>texi2html</i></a>.
</font>

</body>
</html>
