Ticket #15880: 15880.diff
File 15880.diff, 1.0 KB (added by , 14 years ago) |
---|
-
django/utils/autoreload.py
28 28 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 30 31 import os, sys, time 31 import os, sys, time, signal 32 32 33 33 try: 34 34 import thread … … 78 78 attr_list = termios.tcgetattr(fd) 79 79 if not attr_list[3] & termios.ECHO: 80 80 attr_list[3] |= termios.ECHO 81 if hasattr(signal, 'SIGTTOU'): 82 old_handler = signal.signal(signal.SIGTTOU, signal.SIG_IGN) 83 else: 84 old_handler = None 81 85 termios.tcsetattr(fd, termios.TCSANOW, attr_list) 86 if old_handler is not None: 87 signal.signal(signal.SIGTTOU, old_handler) 82 88 83 89 def reloader_thread(): 84 90 ensure_echo_on()