Added resource for max open files.

Fixed bug that could cause infinit looping on SIGBUS.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@460 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-10 21:37:06 +00:00
parent 693ce38317
commit fdc56e8f09
7 changed files with 24 additions and 9 deletions
+4
View File
@@ -121,6 +121,7 @@ initialize_option_handler(ui::Control* c, OptionHandler* optionHandler) {
optionHandler->insert("download_rate", new OptionHandlerInt(c, &apply_global_download_rate, &validate_rate));
optionHandler->insert("upload_rate", new OptionHandlerInt(c, &apply_global_upload_rate, &validate_rate));
optionHandler->insert("hash_read_ahead", new OptionHandlerInt(c, &apply_hash_read_ahead, &validate_read_ahead));
optionHandler->insert("max_open_files", new OptionHandlerInt(c, &apply_max_open_files, &validate_fd));
optionHandler->insert("directory", new OptionHandlerDownloadString(dsm, &apply_download_directory, &validate_directory));
@@ -243,6 +244,9 @@ main(int argc, char** argv) {
void
do_panic(int signum) {
// Use the default signal handler in the future to avoid infint
// loops.
SignalHandler::set_default(signum);
display::Canvas::cleanup();
std::cout << "Signal " << (signum == SIGSEGV ? "SIGSEGV" : "SIGBUS") << " recived, dumping stack:" << std::endl;