Jari Sundell
6558f0ad42
Fixed shutdown handling of stalled http requests.
2026-06-29 16:18:56 +09:00
Jari Sundell
8249070ff1
Remove shutdown comments for directory watch
...
Remove commented code regarding directory watch closure during shutdown.
2026-06-19 10:29:43 +02:00
Xirvik Support
517454b413
control: close directory watch on quick shutdown (fix SIGABRT at exit)
...
Control::handle_shutdown() closes m_directory_events (the inotify directory
watch) only in the normal-shutdown branch (!m_shutdownQuick). On a quick
shutdown (SIGTERM -> receive_quick_shutdown) the m_shutdownQuick branch skips
it, so the watch stays registered in the poll. ~Control() then destroys the
still-open directory_events and Event::~Event()'s assert(m_poll_event == nullptr)
(added with the 0.16.13 poll/event rework) aborts:
main -> Control::~Control() -> ~directory_events -> ~Event() -> abort
Close it in Control::cleanup() instead, which runs on every shutdown path after
the session is saved; close() is idempotent, so the normal path that already
closed it in handle_shutdown() is unaffected.
Reproducible: configure a directory.watch.added watch, then SIGTERM the client
-> SIGABRT (core in Event::~Event); SIGINT (normal shutdown) is clean. With this
change SIGTERM exits cleanly too.
2026-06-19 10:29:43 +02:00
Xirvik Support
c6de871a77
input: survive controlling-terminal/pty hangup on stdin
...
Since the 0.16.13 callback/poll rework, an EPOLLERR on stdin (controlling
terminal or pty hangup) reaches Poll::process(), which aborts the whole
client with an internal_error because InputEvent never registered for error
events:
Poll::process() received error event for event not in error: input-fd:0
Register stdin for error events (insert_error) and handle event_error() by
dropping stdin from the poll set with this_thread::poll()->remove_and_close().
rtorrent then keeps running without keyboard input instead of dying.
remove() guards on the fd state (is_open()), mirroring SCgiTask: event_error()
clears the fd after remove_and_close(), and the shutdown path (Control::cleanup)
still calls remove(); without the guard the second remove_and_close() throws
'event not found' via event_mask(). insert()/remove() take the thread poll
implicitly (this_thread::poll()) instead of a Poll* argument.
2026-06-19 09:12:22 +02:00
tonimelisma
84229a85be
Add directory.watch.ready for safe torrent watch folders
2026-05-25 18:21:31 +02:00
Jari Sundell
797a194abc
Cleaned up torrent header files.
2026-05-14 19:24:38 +09:00
Jari Sundell
9489793dcb
Created torrent/runtime include directory.
2026-01-27 08:21:05 +09:00
Jari Sundell
40c2d90c45
Fixed dereferencing of potentially nullptr in SessionManager.
2025-12-25 23:05:08 +09:00
Jari Sundell
4bdeb58eb6
Run multiple session save requests in parallel.
2025-12-22 06:26:35 +09:00
Jari Sundell
5dbb0020dc
Replace ThreadWorker with scgi::ThreadScgi.
2025-12-18 07:43:43 +09:00
Jari Sundell
8f644e65dd
Use separate thread for saving session data.
2025-12-18 06:42:44 +09:00
Jari Sundell
900be334dc
Cleaned up xmlrpc-c string sanitization.
2025-11-17 02:48:32 +09:00
Jari Sundell
84bfc491ba
Added dual listening ports when both IPv4 and IPv6 are bound.
2025-11-01 07:24:31 +09:00
Jari Sundell
2be730e4b3
Reuse HTTP connections and added totale/cached connection limits.
2025-10-09 21:15:24 +09:00
Jari Sundell
677f8f45c8
Improved listen/dht port handling and added 'dht.override_port.set' command.
2025-09-13 17:51:04 +09:00
Jari Sundell
bb1cdfc0e7
Fixed DHT bind address and converted to using sockaddr.
2025-08-23 02:54:54 +09:00
Jari Sundell
6c25e64c26
Moved curl to libtorrent.
2025-06-05 20:29:43 +09:00
Rosen Penev
897a6face2
clang-tidy: use default member init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2025-06-01 08:16:02 +02:00
Jari Sundell
e8c1f3ed2c
Update to use new this_thread::Poll().
2025-05-31 22:22:31 +09:00
rakshasa
46e94259e8
Make sure threads are rejoined.
2025-05-26 15:18:59 +02:00
Jari Sundell
4c63cee7a2
Cleaned up Poll code and included missing rtorrent.lua in installer.
2025-05-03 21:07:16 +09:00
Jari Sundell
85e74b5542
Removed priority_queue and rak/timer.
2025-05-02 18:03:51 +09:00
Jari Sundell
97415c656b
Various scheduler and therad cleanups.
2025-05-01 16:38:49 +09:00
rakshasa
a8622e5c80
Cleaned up thread-related code.
2025-04-12 23:03:08 +02:00
rakshasa
47af28aecd
Cleaned up ui/root.
2025-03-11 14:13:05 +01:00
kannibalox
9f48226663
Add JSON-RPC capability
...
Inline nlohmann/json for the JSON parsing itself, and handle requests
with the same SCGI interface as XML-RPC.
Based off the work in https://github.com/jesec/rtorrent
2025-01-20 12:31:04 +01:00
Jari Sundell
2e0a417367
Add optional Lua scripting capabilties - kannibalox@gmail.com
2025-01-19 04:02:06 +09:00
stickz
c5563d65c5
cleanup: Remove rak mem_fun
...
This commit removes rak:mem_fun and replaces it with std::function and lambdas.
2025-01-12 10:18:50 -05:00
kannibalox
cd9948a4a8
Remove/replace functional_fun.h functions
2024-12-22 19:17:36 +09:00
chros
74435f6c40
Add 'event.system.startup_done/shutdown' commands/events ( Closes #24 )
2018-09-26 15:12:20 +01:00
zp
7ea5729676
trim modified files
2016-06-19 07:04:23 -05:00
zp
c01709fa27
Allow rtorrent to run as a daemon, slightly modified version of the PR provided by sallyswiss
2016-06-19 02:06:30 -05:00
rakshasa
dc8e786d58
Merge branch 'master' into c++11
...
Conflicts:
src/command_dynamic.cc
src/command_events.cc
src/command_groups.cc
src/command_ip.cc
src/command_network.cc
2014-06-18 00:44:36 +09:00
rakshasa
3b39f37f49
C++11 compatibility fixes.
2014-05-13 23:36:37 +09:00
rakshasa
1e4739c862
Merge branch 'master' into xirvik
2013-08-26 23:17:56 +09:00
rakshasa
529eda5aab
Converted sigc++ slots to std::tr1::function.
2013-08-24 00:14:25 +09:00
rakshasa
b79dea94b2
Wait for disowned http requests to finish to ensure stopped event gets sent to tracker on client shutdown.
2012-05-04 04:02:59 +09:00
rakshasa
6d61cc09c3
Merge branch 'master' into xirvik
2012-05-01 00:56:52 +09:00
rakshasa
f1ece0ae12
Wait for disowned http requests to finish to ensure stopped event gets sent to tracker on client shutdown.
2012-05-01 00:29:50 +09:00
rakshasa
9aa54d2344
Added 'directory.watch.added'.
2012-03-29 23:04:17 +09:00
rakshasa
47125b9c38
Moved main thread object to libtorrent.
2012-02-12 21:58:16 +09:00
Jari Sundell
0626dcf783
C++11 fixes.
2011-12-27 16:45:19 +09:00
Jari Sundell
58727fe7fd
Fixed compiler issues with gcc-4.6 c++0x.
2011-11-18 17:28:50 +09:00
rakshasa
4d313e6353
Updated copyright information.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1301 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-09 06:30:14 +00:00
rakshasa
033e30af04
* Fixed more commands.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1177 e378c898-3ddf-0310-93e7-cc216c733640
2010-10-05 03:36:14 +00:00
rakshasa
c8fc6402bb
* Finished the move over to object_storage, removing command_function.*.
...
* Added redirects for several commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1166 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-29 10:59:41 +00:00
rakshasa
b530d35d94
* More work on rpc::object_storage and moving simple functions over to it.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1165 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-28 15:19:18 +00:00
rakshasa
3cae3d37be
* Cleaning up command names. The deprecated commands will be redirected.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1131 e378c898-3ddf-0310-93e7-cc216c733640
2010-02-16 17:29:53 +00:00
rakshasa
588f9e80c7
* Threaded XMLRPC support. Sponsored by Xirvik.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1123 e378c898-3ddf-0310-93e7-cc216c733640
2010-01-25 13:14:09 +00:00
rakshasa
2c7563825c
* Added shutdown for worker thread.
...
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1117 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-22 03:29:47 +00:00