Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #10047

Closed (moved)
Open
Opened Oct 29, 2013 by Ximin Luo@infinity0

PTs could self-shutdown when they detect their stdout is closed

In [ticket:9330] we were exploring solutions to signal a PT to do clean shutdown on Windows. In [ticket:10006] dcf suggested a workaround using JobObjects, which has the nice property that the children shutdown even when their parent crashes or is killed (SIGKILL or TerminateProcess).

This raises the valid point, why don't we try to achieve this for all platforms? Since all PTs must already communicate via stdout back to Tor (or any parent process, such as a PT chainer), one way of detecting parent death is to check that stdout is still open.

Example: [http://compgroups.net/comp.unix.programmer/how-to-kill-all-child-when-parent-exits/36841]

We'll need to research whether we must write to the stream to detect it's closed, or if we can get away with doing something like poll or select.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#10047