~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/rabbit/testing/server.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-14 14:51:37 UTC
  • mfrom: (13119.1.5 rabbit-fixture-sigpipe)
  • Revision ID: launchpad@pqm.canonical.com-20110614145137-0ov6lniz6uvg7h71
[no-qa] [r=allenap][bug=788557] Reset the SIGPIPE handler when
        spawning RabbitMQ.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
import errno
13
13
import os
14
14
import re
 
15
import signal
15
16
import socket
16
17
import subprocess
17
18
import sys
92
93
    # print '## Starting', name, '##'
93
94
    os.setsid()
94
95
 
 
96
    # Revert Python's handling of SIGPIPE. See
 
97
    # http://bugs.python.org/issue1652 for more info.
 
98
    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
 
99
 
95
100
    # fork 2 - now detach once more free and clear
96
101
    pid = os.fork()
97
102
    if pid: