<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY style="COLOR: #000000; FONT-FAMILY: Arial">
<DIV><SPAN class=073330309-05052003><FONT size=2>While I haven't tried the
safe_asterisk, the construct you mention is correct in
bash/ash/ksh</FONT></SPAN></DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2>while :; do</FONT></SPAN></DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2>
:</FONT></SPAN></DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2>done</FONT></SPAN></DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=073330309-05052003><FONT size=2>Would basically be a correct
bash "hang forever and waste tons of cpu cycles" script. The key to
understanding this rather bizarre syntax is the knowledge that ":" is actually a
build in shell command - just like ".". It does absolutely nothing except
expanding it's arguments (in this case none) AND return a zero exit code (which
is the feature used here).</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
asterisk-users-admin@lists.digium.com
[mailto:asterisk-users-admin@lists.digium.com]<B>On Behalf Of </B>Uriel
Carrasquilla<BR><B>Sent:</B> 05 May 2003 12:00<BR><B>To:</B>
asterisk-users@lists.digium.com<BR><B>Subject:</B> [Asterisk-Users]
safe_asterisk<BR><BR></FONT></DIV>
<DIV><FONT size=2><SPAN class=693295603-05052003>I was looking at the shell in
/usr/sbin and the following statement does not seem right: while :;
(read colon + semi colon).</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=693295603-05052003>In C that would be
2xsemi-colon. is this correct in a bash shell?</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=693295603-05052003>I am having problems with
safe_asterisk. when it dies, it is not being brought up again. It
works very well for stop/start/startus but does not bring up asterisk when it
fails.</SPAN></FONT></DIV></BLOCKQUOTE></BODY></HTML>