1. 01 Feb, 2011 2 commits
  2. 27 Jan, 2011 1 commit
  3. 26 Jan, 2011 16 commits
  4. 23 Jan, 2011 13 commits
  5. 13 Jan, 2011 3 commits
  6. 01 Jan, 2011 5 commits
    • Avery Pennarun's avatar
      973d5a95
    • Avery Pennarun's avatar
      ssyslog.py: use daemon.notice instead of daemon.info · 95ab6e71
      Avery Pennarun authored
      ...MacOS X seems to default (in /etc/syslog.conf) to not logging daemon.info
      anywhere.  That kind of defeats the purpose, I think.
      95ab6e71
    • Avery Pennarun's avatar
      Merge branch 'daemon' · e6d7c44e
      Avery Pennarun authored
      * daemon:
        daemonization: make sure the firewall subproc sends to syslog too.
        Rearrange daemonization/syslog stuff and make it more resilient.
        run in background (daemon) and option
      e6d7c44e
    • Avery Pennarun's avatar
    • Avery Pennarun's avatar
      Rearrange daemonization/syslog stuff and make it more resilient. · 8a5ae1a4
      Avery Pennarun authored
      Rename --background to -D/--daemon, to match other programs (like smbd).
      
      You can now have --syslog even without --daemon.
      
      Avoid using atexit(); try/finally is better.
      
      Don't just close stderr; we'll end up eating error output from ssh!
      Instead, redirect stderr to a 'logger' subprocess that will send to syslog.
      
      Delay redirecting stderr until after we know we're daemonizing, so handy
      error messages can go to stderr instead of syslog.
      
      Make pidfile stuff more resilient: support already-existing files, files
      with strict permissions, outdated files containing an already-dead pid.  Add
      a --pidfile option to let you specify the pidfile path.
      
      chdir("/") while daemonizing, so that the filesystem containing $PWD can
      later be unmounted without killing the daemon.
      
      fw.done() can't wait on the firewall subprocess on exit when daemonized; we
      no longer are the parent of that process.
      8a5ae1a4