Opened 4 months ago

Closed 4 months ago

#22374 closed defect (implemented)

tor-prompt should handle /events even after tor has died

Reported by: teor Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I set up a chutney network using:

Then ran tor-prompt using:

./tor-prompt -i 8000

Then issued:

SETEVENTS AUTHDIR_NEWDESCS

When chutney finishes, it kills the tor instances it started.

And then I tried to get the events from tor-prompt:

/events

But it quit, probably because tor had died.

Child Tickets

Change History (1)

comment:1 Changed 4 months ago by atagar

Resolution: implemented
Status: newclosed

Great idea, thanks for suggesting this teor! Made this so.

The interpreter no longer quits when the control connection is closed. Instead, it shows a one-time prompt if you issue a tor command afterward (other inputs like /events work normally). In the following I ctrl+c after calling SETEVENTS...

https://www.atagar.com/transfer/stem/interpreter_shutdown_prompt.png

On a side note when you snagged those events for me there's a new interpreter feature you might've found handy. Rather than calling 'SETEVENTS' followed by '/events' you could've just run tor-prompt --run "SETEVENTS AUTHDIR_NEWDESC". This would print those events to stdout until you ctrl+c...

https://stem.torproject.org/tutorials/down_the_rabbit_hole.html#running-individual-commands

Note: See TracTickets for help on using tickets.