Removed unused -C commandline option (was for debug).

git-svn-id: file:///svn/unbound/trunk@459 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-07-27 06:41:42 +00:00
parent 185a7cd276
commit 912999e187
5 changed files with 58 additions and 96 deletions

77
aclocal.m4 vendored
View file

@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
# serial 48 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@ -1397,6 +1397,18 @@ freebsd1*)
dynamic_linker=no
;;
kfreebsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='GNU ld.so'
;;
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@ -1552,7 +1564,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
linux* | k*bsd*-gnu)
linux*)
version_type=linux
need_lib_prefix=no
need_version=no
@ -1566,10 +1578,27 @@ linux* | k*bsd*-gnu)
# before this can be enabled.
hardcode_into_libs=yes
# find out which ABI we are using
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*64-bit*)
libsuff=64
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
;;
esac
fi
rm -rf conftest*
;;
esac
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^[ ]*//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@ -1581,7 +1610,7 @@ linux* | k*bsd*-gnu)
dynamic_linker='GNU/Linux ld.so'
;;
netbsdelf*-gnu)
knetbsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@ -1590,7 +1619,7 @@ netbsdelf*-gnu)
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
dynamic_linker='GNU ld.so'
;;
netbsd*)
@ -2298,7 +2327,7 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
freebsd* | dragonfly*)
freebsd* | kfreebsd*-gnu | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@ -2352,11 +2381,11 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
linux* | k*bsd*-gnu)
linux*)
lt_cv_deplibs_check_method=pass_all
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@ -3104,7 +3133,7 @@ case $host_os in
freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;;
freebsd* | dragonfly*)
freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
@ -3263,7 +3292,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
linux* | k*bsd*-gnu)
linux*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@ -3365,7 +3394,7 @@ case $host_os in
;;
esac
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
wlarc=
@ -4630,7 +4659,7 @@ hpux*) # Its linker distinguishes data from code symbols
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
linux* | k*bsd*-gnu)
linux*)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
@ -4903,7 +4932,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
freebsd* | dragonfly*)
freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@ -4946,7 +4975,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
linux* | k*bsd*-gnu)
linux*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@ -4989,7 +5018,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
;;
osf3* | osf4* | osf5*)
case $cc_basename in
@ -5200,7 +5229,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
linux* | k*bsd*-gnu)
linux*)
case $cc_basename in
icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@ -5341,9 +5370,6 @@ ifelse([$1],[CXX],[
cygwin* | mingw*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
;;
linux* | k*bsd*-gnu)
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@ -5514,7 +5540,7 @@ EOF
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
linux* | k*bsd*-gnu)
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@ -5540,13 +5566,12 @@ EOF
$echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@ -5876,7 +5901,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
freebsd* | kfreebsd*-gnu | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
@ -5978,7 +6003,7 @@ _LT_EOF
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
netbsd* | netbsdelf*-gnu)
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@ -6345,6 +6370,7 @@ do
done
done
done
IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@ -6377,6 +6403,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
done
])
SED=$lt_cv_path_SED
AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])

View file

@ -55,9 +55,6 @@
#include <pwd.h>
#include <sys/resource.h>
/** if we want to enable coredumps after daemonize */
static int enable_coredumps = 0;
/** print usage. */
static void usage()
{
@ -66,7 +63,6 @@ static void usage()
printf("-h this help\n");
printf("-c file config file to read, unbound.conf(5).\n");
printf("-d do not fork into the background.\n");
printf("-C try to enable coredumps after fork into background.\n");
printf("-v verbose (multiple times increase verbosity)\n");
printf("Version %s\n", PACKAGE_VERSION);
printf("BSD licensed, see LICENSE in source package for details.\n");
@ -109,51 +105,6 @@ checkrlimits(struct config_file* cfg)
}
}
/** printout rlimit prettily */
static void
print_rlim_pretty(const char* str, struct rlimit* rlim)
{
if(rlim->rlim_cur == (rlim_t)RLIM_INFINITY &&
rlim->rlim_max == (rlim_t)RLIM_INFINITY)
log_info("%s unlimited, max unlimited", str);
else if(rlim->rlim_max == (rlim_t)RLIM_INFINITY)
log_info("%s %d, max unlimited", str, (int)rlim->rlim_cur);
else if(rlim->rlim_cur == (rlim_t)RLIM_INFINITY)
log_info("%s unlimited, max %d", str, (int)rlim->rlim_max);
else log_info("%s %d, max %d", str, (int)rlim->rlim_cur,
(int)rlim->rlim_max);
}
/** try to enable coredumps */
static void
do_coredump_enable()
{
struct rlimit rlim;
if(getrlimit(RLIMIT_CORE, &rlim) < 0) {
log_warn("getrlimit(core): %s", strerror(errno));
return;
}
print_rlim_pretty("rlimit(core) is", &rlim);
if(rlim.rlim_cur == (rlim_t)RLIM_INFINITY &&
rlim.rlim_max == (rlim_t)RLIM_INFINITY) {
return;
}
if(rlim.rlim_cur > (rlim_t)10000) {
return;
}
rlim.rlim_cur = (rlim_t)RLIM_INFINITY;
rlim.rlim_max = (rlim_t)RLIM_INFINITY;
if(setrlimit(RLIMIT_CORE, &rlim) < 0) {
log_warn("setrlimit(core): %s", strerror(errno));
return;
}
if(getrlimit(RLIMIT_CORE, &rlim) < 0) {
log_warn("getrlimit(core, upd): %s", strerror(errno));
return;
}
print_rlim_pretty("updated rlimit(core) is", &rlim);
}
/** to changedir, logfile */
static void
apply_dir(struct daemon* daemon, struct config_file* cfg, int cmdline_verbose)
@ -332,8 +283,6 @@ do_chroot(struct daemon* daemon, struct config_file* cfg, int debug_mode)
log_init(cfg->logfile);
if(!debug_mode && cfg->do_daemonize) {
detach(cfg);
if(enable_coredumps)
do_coredump_enable();
}
if(cfg->pidfile && cfg->pidfile[0]) {
writepid(cfg->pidfile, getpid());
@ -412,11 +361,8 @@ main(int argc, char* argv[])
log_init(NULL);
/* parse the options */
while( (c=getopt(argc, argv, "Cc:dhv")) != -1) {
while( (c=getopt(argc, argv, "c:dhv")) != -1) {
switch(c) {
case 'C':
enable_coredumps = 1;
break;
case 'c':
cfgfile = optarg;
break;

View file

@ -1,3 +1,6 @@
27 July 2007: Wouter
- removed useless -C debug option. I did not work.
26 July 2007: Wouter
- cycle detection, for query state dependencies. Will attempt to
circumvent the cycle, but if no other targets available fails.

View file

@ -5,16 +5,6 @@ o profile memory allocation, and if performance issues, use special memory
allocator. For example, with caches per thread.
o #define BIT_... different on bigendian and smallendian systems so that
the htons on flags is not needed to send a message from the cache.
o possible optimization with delayed malloc of msgreply after parse
(reuse parse structures and ptrs to packet in meantime).
o possible optimization, so that precious id number resource is not depleted
by parsing of messages. Delay malloc, as above, or try to reverse release
special id numbers, and if you release the next_id number for the thread
it reuses that id number.
o use rbtree to compress domain names in messages, sorted AXFRs of 16Kb
and so on. For current packets, even worstcase, list, is ok. Only if we
start to send out compressed AXFRs then it becomes a problem.
We can cap AXFR packets on 256 or 1024 domain names, for example.
o speed up pkt domain name decompression loop detection using counter perhaps.
o detect OS/400 pthreads implementation that allows upgrading to writelock
on pthreads rwlocks and use it to examine-rd before storing-wr rrset cache.
@ -24,6 +14,8 @@ o understand NSEC/NSEC3, aggressive negative caching, so that updates to
o fallback without EDNS if result is NOTIMPL, now only on FORMERR like in java.
o scrubber has slow pkt_subdomain and pkt_strict_subdomain functions.
o get serverselection algorithm out of local optimum.
make subtargets to get rtt info for a couple of targets, like fetch-policy.
or send out multiple queries to multiple servers.
o donotqueryaddresses allow specification of subnets, use trie to store.
extend default list to contain illegal ip4 and ip6 addresses.
o memory profile; and if needed put serviced queries under qstate->region

View file

@ -16,7 +16,6 @@ unbound
.Op Fl h
.Op Fl d
.Op Fl v
.Op Fl C
.Op Fl c Ar cfgfile
.Sh DESCRIPTION
@ -43,11 +42,6 @@ console.
Increase verbosity. If given multiple times, more information is logged.
This is in addition to the verbosity (if any) from the config file.
.It Fl C
Try to enable coredumps after forking into the background. If you do not
have permission to alter the ulimits, then this will fail. Performs
the equivalent of 'ulimit -c unlimited'. For debug purposes.
.El
.Sh SEE ALSO
.Xr unbound.conf 5 .