[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15435 [Tor]: Tor should not close stdin on child processes.
#15435: Tor should not close stdin on child processes.
---------------------------+-----------------------------------------------
Reporter: yawning | Owner:
Type: | Status: needs_review
enhancement | Milestone: Tor: 0.2.7.x-final
Priority: normal | Version: Tor: unspecified
Component: Tor | Keywords: tor-pt, needs-spec-patch pt-wants
Resolution: | Parent ID:
Actual Points: |
Points: |
---------------------------+-----------------------------------------------
Changes (by yawning):
* cc: asn (added)
Comment:
Replying to [comment:12 dcf]:
> Yes, assuming it's implementable. You don't want to spec something that
turns out to be awkward to implement.
Ok. pyptlib does zero termination handling, so all that changes there is
a method that wraps getenv. The obfsproxy side is trivial, since twisted
makes monitoring for events on file descriptors easy
(twisted.internet.stdio).
If asn doesn't want to do the changes I will (Though #15471 might be good
enough given our Lenooks monoculture).
> Removing SIGINT from pt-spec sounds good to me, that always seemed more
trouble than it was worth. If all you have to worry about is SIGINT and
eof, then that's probably simple enough to implement by hand.
Even with SIGINT in the picture, I don't think an event that should be
treated as "run whatever cleanup is needed, terminate now" is that hard to
implement. The only reason why I do the "sigterm myself" dance in
obsf4proxy is because I didn't feel like passing a channel around (I'll
probably change this actually).
There's another side to this that still needs writing (and probably a
separate ticket) that changes the pt teardown process to be multi-stage
(close stdin, give the child sometime to exit, follow up with more
destructive methods to kill the child off). As it stands right now, the
main benefit to implementing what is specified is that PTs will always
clean up properly if tor crashes for any reason.
(Yes, I will change the PT teardown to be multi-stage, provided that this
ticket happens.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15435#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs