mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-07 18:55:23 +01:00
- Fixed a /RESTART issue on Linux: Unreal did not properly close all file-
descriptors. Because of this, Unreal did not restart properly as you would get an "Address already in use" error. This only seemed to happen when logging to syslog. - Fixed a similar issue with syslog (and debugmode) and closing fd's as well: the first port we listened on would not open up, ircd did not log any error.
This commit is contained in:
parent
6b28bfd1b7
commit
7ad6dcd977
3 changed files with 13 additions and 2 deletions
6
Changes
6
Changes
|
@ -1894,3 +1894,9 @@
|
|||
not exist, it now asks you if you want to automatically download and
|
||||
install curl (which is done by ./curlinstall).
|
||||
This has been tested on Linux, further testing on f.e. FreeBSD is required.
|
||||
- Fixed a /RESTART issue on Linux: Unreal did not properly close all file-
|
||||
descriptors. Because of this, Unreal did not restart properly as you would
|
||||
get an "Address already in use" error. This only seemed to happen when
|
||||
logging to syslog.
|
||||
- Fixed a similar issue with syslog (and debugmode) and closing fd's as well:
|
||||
the first port we listened on would not open up, ircd did not log any error.
|
||||
|
|
|
@ -361,8 +361,7 @@ void server_reboot(char *mesg)
|
|||
if (!(bootopt & (BOOT_TTY | BOOT_DEBUG)))
|
||||
(void)close(2);
|
||||
(void)close(1);
|
||||
if ((bootopt & BOOT_CONSOLE) || isatty(0))
|
||||
(void)close(0);
|
||||
(void)close(0);
|
||||
(void)execv(MYNAME, myargv);
|
||||
#else
|
||||
close_connections();
|
||||
|
|
|
@ -605,6 +605,9 @@ char logbuf[BUFSIZ];
|
|||
# endif
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#ifdef HAVE_SYSLOG
|
||||
closelog(); /* temporary close syslog, as we mass close() fd's below... */
|
||||
#endif
|
||||
#ifndef NOCLOSEFD
|
||||
for (fd = 3; fd < MAXCONNECTIONS; fd++)
|
||||
{
|
||||
|
@ -655,6 +658,9 @@ init_dgram:
|
|||
close(fileno(stdout));
|
||||
if (!(bootopt & BOOT_DEBUG))
|
||||
close(fileno(stderr));
|
||||
#endif
|
||||
#ifdef HAVE_SYSLOG
|
||||
openlog("ircd", LOG_PID | LOG_NDELAY, LOG_DAEMON); /* reopened now */
|
||||
#endif
|
||||
memset(local, 0, sizeof(aClient*) * MAXCONNECTIONS);
|
||||
LastSlot = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue