#1955 closed enhancement (implemented)
Control protocol 'signal' event for when we get a hup, etc
Reported by: | arma | Owned by: | |
---|---|---|---|
Priority: | Low | Milestone: | Tor: 0.2.3.x-final |
Component: | Core Tor/Tor | Version: | |
Severity: | Keywords: | easy | |
Cc: | special@… | Actual Points: | |
Parent ID: | Points: | ||
Reviewer: | Sponsor: |
Description
It would be good to add a new 'signal' event to the control protocol, so it can tell us when we get a hup, usr1, etc. Mainly this involves adding it to control-spec.txt, and then instrumenting signal_callback() in src/or/main.c to send the event with the right arguments.
Child Tickets
Attachments (1)
Change History (9)
comment:1 Changed 9 years ago by
Cc: | special@… added |
---|
comment:2 Changed 9 years ago by
Milestone: | → Tor: 0.2.3.x-final |
---|
comment:3 Changed 9 years ago by
Whoops, I was thinking of a different bug. This one should be fairly easy too, modulo the flushing issues.
Too many tabs open.
Changed 9 years ago by
Attachment: | 0001-Add-a-SIGNAL-event-for-control-connections.patch added |
---|
comment:4 Changed 9 years ago by
Status: | new → needs_review |
---|
Attached a patch implementing this event.
Implementing SHUTDOWN or HALT would require waiting for the control connections to cleanly close on exit. That is pretty far out of scope for this feature, so I documented those as missing.
RELOAD is also slightly misleading. With ReloadTorrcOnSIGHUP, the event will still be sent, but the configuration is not reloaded (the other SIGHUP actions do take place). If this is a concern, one option would be to have both 'RELOAD' and 'HUP' as events.
comment:5 Changed 9 years ago by
Milestone: | Tor: 0.2.3.x-final → Tor: 0.2.2.x-final |
---|
Changing the milestone to 0.2.2.x as per Sebastian's advice
comment:6 Changed 9 years ago by
Milestone: | Tor: 0.2.2.x-final → Tor: 0.2.3.x-final |
---|
Changing it back; this is too feature-like for the 0.2.2 series, alas.
comment:7 Changed 9 years ago by
Resolution: | → implemented |
---|---|
Status: | needs_review → closed |
Looks okay on review. Will merge.
For next time, please try "make check-spaces" to make sure you're conforming with our code style, and try adding a file to the changes/ directory for the changelog.
comment:8 Changed 7 years ago by
Component: | Tor Client → Tor |
---|
So it would. This should be fairly easy for anybody who reads C and can track the control flow for the SIGNAL command from handle_control_signal() down through signal_callback() to do_hup().