<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Kevin,<br>
<br>
'Posting' an event like a reload request for a HUP signal is a <i><u><b>much</b></u></i>
safer way for any interrupt handler to operate. It eliminates the <i><u><b>many</b></u></i>
complications of re-entrant interrupt handler code. Signal handlers are
not the only 'interrupt' handlers that can benefit from such a change.
I would suspect that there are other 'interrupt' type handlers within
Asterisk that would also benefit.<br>
<br>
After writing a few embedded operating systems in my career - the
general rule of thumb to avoid nasty operational surprises has been
that an interrupt handler should never make a call to another function.
Have it set a flag and exit and then check for the flag in the main
processing loop. Your trouble reports and bug list will get much
shorter....<br>
<br>
Kevin P. Fleming wrote:
<blockquote cite="mid45BF40A3.1030409@digium.com" type="cite">
<pre wrap="">Russell Bryant wrote:
</pre>
<blockquote type="cite">
<pre wrap="">So, can anyone think of a good reason why this hander calls
ast_module_reload()?
</pre>
</blockquote>
<pre wrap=""><!---->
Yep... it's so users can do:
$ kill -HUP 'pidof asterisk'
(or something similar) to get Asterisk to re-read all its configuration,
like many other daemons do.
One possible way to address this would be for the signal handler to just
'post' the module reload request somewhere and have another thread do
the reload.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<table border="0" cellpadding="2" cellspacing="0" width="569">
<tbody>
<tr bgcolor="#000099" valign="middle">
<td colspan="2"><font color="#ffffff"
face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>Bob
Atkins </strong></font><font color="#ffffff"> </font></td>
</tr>
<tr valign="middle">
<td colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif"
size="1"><em>President/CEO</em></font></td>
</tr>
<tr valign="middle">
<td width="233">
<p align="center"><font
face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font
color="#000080"><span
style="font-weight: bold; font-family: Trebuchet MS;"><a
href="http://www.digilink.net"><img
src="cid:part1.05000506.08000904@digilink.net" alt="DigiLink, Inc."
style="border: 0px solid ; width: 216px; height: 48px;"></a></span></font></b><br>
<font color="#006600">Business Inter-net-working</font><br>
<font color="#000099"><strong><em>The Cure for the Common ISP!</em></strong></font></font></p>
</td>
<td width="328">
<p align="right"><font color="#666666"
face="Verdana, Arial, Helvetica, sans-serif" size="1">Phone: </font><font
face="Verdana, Arial, Helvetica, sans-serif" size="1">(310) 577-9450<br>
</font><font color="#666666"
face="Verdana, Arial, Helvetica, sans-serif" size="1">Fax: </font><font
face="Verdana, Arial, Helvetica, sans-serif" size="1">(310) 577-3360</font><font
face="Verdana, Arial, Helvetica, sans-serif" size="1"><br>
<font color="#666666">eMail:</font> <a class="moz-txt-link-abbreviated" href="mailto:bob@digilink.net">bob@digilink.net</a><br>
</font></p>
</td>
</tr>
</tbody>
</table>
<p> </p>
</div>
</body>
</html>