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
  • #5130

Closed
Open
Opened Feb 14, 2012 by Trac@tracbot

Allow obfsproxy to daemonize

I've been working on setting up obfsproxy and I ran into a minor issue: It doesn't seem possible to send the obfsproxy process into the background (i.e. daemonize it) if I'm running it as an external server and not in managed mode. If I want to be able to specify the listening port for a bridge server I don't think there's a way to do this without running obfsproxy as an external server (please correct me if I'm wrong). However, there's no option to fork/detach from the terminal in the case of an external server, which seems a rather significant issue.

I've written a small patch for main.c that seems to correct this problem (see attached). This implements two command line arguments, "--daemonize", which, when specified will just send the program into the background and "--daemonize_with_pid=<pid_file>", which will daemonize and write the process id to the specified file. This patch only works on unix systems, but I've added #ifdef directives that only enable this code if unistd.h is defined, otherwise it will be completely ignored.

Trac:
Username: ericpaulbishop

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#5130