Hi Florian!
It _DOES_ reread the config file, though (i changed the motd) I looked at the code... NGIRCd_SignalRestart is set to FALSE just at the beginning of the main loop int ngircd.c (around line 236 or so)... Hmmm... Why would you want it to fork()?
(everything is the same for /REHASH)
Ah, yes ... I meant RESTART ...
When ngIRCd (re-)starts it forks a child process to detach itself off the console and "go to background".
<alex@Alex-PC:~> $ ps ax|grep ngircd 15373 ? Ss 0:00 /opt/ngircd/HEAD/sbin/ngircd 17214 pts/3 R+ 0:00 grep ngircd *** Connect, become IRC operator and issue RESTART command ... *** <alex@Alex-PC:~> $ ps ax|grep ngircd 17246 ? Ss 0:00 /opt/ngircd/HEAD/sbin/ngircd 17267 pts/3 S+ 0:00 grep ngircd
A possible solution should be (untested):
in main():
- open/create pid file with before dropping privileges
Yes, i thought about this. This would also eliminate the need to have a writeable file in the chroot. (So yes, I agree my patch is not optimal ;-) )
;-)
- unlink the file.
- call Write_Pidfile() inside the main loop.
- close the file before exiting.
I don't understand... Why would i need a pid file that i can't see from the outside of the process?
Right, this is nonsense. Until now I thought that the directory entry is removed not until the file is closed. But this is wrong, the unlink() can only be done when ngIRCd shuts down.
Regards Alex