Changeset 1514

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

Moved the sigterm capturing elsewhere

Location:
pykota/trunk
Files:
3 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 : 
  • pykota/trunk/pykota/accounters/software.py

    r1495 r1514  
    2222# 
    2323# $Log$ 
     24# Revision 1.4  2004/06/02 21:51:14  jalet 
     25# Moved the sigterm capturing elsewhere 
     26# 
    2427# Revision 1.3  2004/05/24 22:45:49  jalet 
    2528# New 'enforcement' directive added 
     
    7174            retcode = child.wait() 
    7275        except OSError, msg :     
    73             self.filter.logger.log_message(_("Problem while waiting for software accounter pid %s to exit") % child.pid) 
     76            self.filter.logger.log_message(_("Problem while waiting for software accounter pid %s to exit : %s") % (child.pid, msg)) 
    7477        else :     
    7578            if os.WIFEXITED(retcode) : 
  • pykota/trunk/pykota/tool.py

    r1512 r1514  
    2222# 
    2323# $Log$ 
     24# Revision 1.93  2004/06/02 21:51:02  jalet 
     25# Moved the sigterm capturing elsewhere 
     26# 
    2427# Revision 1.92  2004/06/02 13:21:38  jalet 
    2528# Debug message added 
     
    810813        self.exportJobInfo() 
    811814        self.jobdatastream = self.openJobDataStream() 
     815        self.logdebug("Capturing SIGTERM events.") 
     816        signal.signal(signal.SIGTERM, self.sigterm_handler) 
    812817         
    813818    def openJobDataStream(self) :