Changeset 1514 for pykota/trunk/bin

Show
Ignore:
Timestamp:
06/02/04 23:51:14 (20 years ago)
Author:
jalet
Message:

Moved the sigterm capturing elsewhere

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1513 r1514  
    2424# 
    2525# $Log$ 
     26# Revision 1.56  2004/06/02 21:50:56  jalet 
     27# Moved the sigterm capturing elsewhere 
     28# 
    2629# Revision 1.55  2004/06/02 14:25:07  jalet 
    2730# Should correctly capture ALL errors now 
     
    463466            endinput = 1 
    464467         
    465         self.logdebug("Capturing SIGTERM events.") 
    466         signal.signal(signal.SIGTERM, self.sigterm_handler) 
    467          
    468468        self.logdebug("Entering streams polling loop...") 
    469469        MEGABYTE = 1024*1024 
     
    480480                    os.kill(subprocess.pid, signal.SIGTERM) 
    481481                except OSError, msg : # ignore but logs if process was already killed. 
    482                     self.logdebug("Error while sending signal to pid %s" % subprocess.pid) 
     482                    self.logdebug("Error while sending signal to pid %s : %s" % (subprocess.pid, msg)) 
    483483                else :     
    484484                    self.logger.log_message(_("SIGTERM was sent to real backend %s (pid: %s)") % (realbackend, subprocess.pid), "info") 
     
    591591        self.logdebug("Exiting streams polling loop...") 
    592592         
    593         self.logdebug("Ignoring SIGTERM again.") 
    594         signal.signal(signal.SIGTERM, signal.SIG_IGN) 
    595              
    596593        # Check exit code of original CUPS backend.     
    597594        if status == -1 :