Ticket #2934: xfrout.diff

File xfrout.diff, 922 bytes (added by jinmei, 7 years ago)
  • src/bin/xfrout/xfrout.py.in

    diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in
    index 1863ad0..31b2de5 100755
    a b import signal 
    2525from isc.datasrc import DataSourceClient, ZoneFinder, ZoneJournalReader
    2626from socketserver import *
    2727import os
     28import fcntl
    2829from isc.config.ccsession import *
    2930from isc.cc import SessionError, SessionTimeout
    3031from isc.statistics import Counters
    class UnixSockServer(socketserver_mixin.NoPollMixIn, 
    793794        if sock_fd < 0:
    794795            logger.warn(XFROUT_RECEIVE_FD_FAILED)
    795796            return False
     797        flags = fcntl.fcntl(sock_fd, fcntl.F_GETFL)
     798        flags &= ~os.O_NONBLOCK
     799        fcntl.fcntl(sock_fd, fcntl.F_SETFL, flags)
    796800
    797801        # receive request msg.  If it fails we simply terminate the thread;
    798802        # it might be possible to recover from this state, but it's more likely