[Asterisk-Users] safe_asterisk

Lars Boegild Thomsen lth at cow.dk
Mon May 5 02:09:46 MST 2003


While I haven't tried the safe_asterisk, the construct you mention is
correct in bash/ash/ksh

while :; do
    :
done

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).
  -----Original Message-----
  From: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com]On Behalf Of Uriel
Carrasquilla
  Sent: 05 May 2003 12:00
  To: asterisk-users at lists.digium.com
  Subject: [Asterisk-Users] safe_asterisk


  I was looking at the shell in /usr/sbin and the following statement does
not seem right: while :;  (read colon + semi colon).
  In C that would be 2xsemi-colon.  is this correct in a bash shell?
  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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20030505/e6325785/attachment.htm


More information about the asterisk-users mailing list