Anonymous Guest
|
Posted: Sun Jun 24, 2007 3:54 am Post subject: SIGHUP Crash The Server |
|
|
Hi to all,
I am using Icecast_2.3.1 and whenever I try to send HUP signal to the server it always fails. I have added some code pieces and cleared some of them (in sighandler.c and cfgfile.c) to resolve the problem:
| Code: |
void _sig_hup(int signo)
{
INFO0("Scheduling config reread Global Control ! ...");
global . schedule_config_reread = 1;
/* some OSes require us to reattach the signal handler */
INFO0("Scheduled config reread, SIGHUP sending ...");
signal(SIGHUP, _sig_hup);
INFO0("Signal sended ...");
}
|
This works properly and I could see the messages in log file. Also I have added debug codes in cfgfile.c/config_clear() for each section and here is the output:
| Quote: |
[2007-06-24 05:13:21] INFO CONFIG/config_clear Config Clearing
[2007-06-24 05:13:21] INFO CONFIG/config_clear Relays Cleared
.....
[2007-06-24 05:13:21] INFO CONFIG/config_clear Mounts Cleared
And Nothing! |
Related code piece in cfgfile.c/config_clear() here:
| Code: |
INFO0("Config Mounts Cleared");
alias = c->aliases;
while(alias) {
nextalias = alias->next;
xmlFree(alias->source);
xmlFree(alias->destination);
xmlFree(alias->bind_address);
free(alias);
alias = nextalias;
}
INFO0("Aliases Cleared"); |
I couldn't see "Aliases Cleared" message in log file and thought the problem might be alias section and comment them out. The server again crashed but not immediately. When I comment "global . schedule_config_reread = 1;" line out, Icecast do not reread config file.
I am not sure if this is a bug so I decided to write this here.
Thanks. |
|