[asterisk-commits] simon.perreault: branch group/v6 r84782 - /team/group/v6/trunk/main/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 5 11:40:31 CDT 2007
Author: simon.perreault
Date: Fri Oct 5 11:40:31 2007
New Revision: 84782
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84782
Log:
Undo. That was a really dumb idea.
Modified:
team/group/v6/trunk/main/asterisk.c
Modified: team/group/v6/trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/asterisk.c?view=diff&rev=84782&r1=84781&r2=84782
==============================================================================
--- team/group/v6/trunk/main/asterisk.c (original)
+++ team/group/v6/trunk/main/asterisk.c Fri Oct 5 11:40:31 2007
@@ -80,7 +80,6 @@
#include <grp.h>
#include <pwd.h>
#include <sys/stat.h>
-#include <dirent.h>
#if defined(HAVE_SYSINFO)
#include <sys/sysinfo.h>
#endif
@@ -1207,27 +1206,6 @@
AST_RWLIST_UNLOCK(&atexits);
}
-static void show_fd_leaks(void)
-{
- DIR *d;
- struct dirent *fd;
- char buf[PATH_MAX];
- ssize_t len;
-
- if (!(d = opendir("/proc/self/fd")))
- return;
-
- while ((fd = readdir(d))) {
- snprintf(buf, sizeof(buf), "/proc/self/fd/%s", fd->d_name);
- if ((len = readlink(buf, buf, sizeof(buf))) == -1)
- continue;
- buf[len] = '\0';
- ast_debug(1, "Possible FD leak: %s -> %s\n", fd->d_name, buf);
- }
-
- closedir(d);
-}
-
static void quit_handler(int num, int nice, int safeshutdown, int restart)
{
char filename[80] = "";
@@ -1306,7 +1284,6 @@
close(ast_consock);
if (!ast_opt_remote)
unlink(ast_config_AST_PID);
- show_fd_leaks();
printf(term_quit());
if (restart) {
if (option_verbose || ast_opt_console)
More information about the asterisk-commits
mailing list