Changeset 2624
- Timestamp:
- 01/16/06 23:27:07 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r2622 r2624 59 59 PyKotaTool.deferredInit(self) 60 60 self.gotSigTerm = 0 61 self.disableSigInt() 61 62 self.installSigTermHandler() 62 63 … … 78 79 signal.signal(signal.SIGTERM, self.sigtermHandler) 79 80 self.logdebug("SIGTERM handler installed.") 81 82 def disableSigInt(self) : 83 """Disables the SIGINT signal (which raises KeyboardInterrupt).""" 84 self.logdebug("Disabling SIGINT...") 85 self.oldSigIntHandler = signal.signal(signal.SIGINT, signal.SIG_IGN) 86 self.logdebug("SIGINT disabled.") 87 88 def enableSigInt(self) : 89 """Enables the SIGINT signal (which raises KeyboardInterrupt).""" 90 self.logdebug("Enabling SIGINT...") 91 signal.signal(signal.SIGINT, self.oldSigIntHandler) 92 self.logdebug("SIGINT enabled.") 80 93 81 94 def discoverOtherBackends(self) : … … 238 251 self.logdebug("JobOriginatingHostName : %s" % self.ClientHost) 239 252 253 self.enableSigInt() 240 254 self.logdebug("Backend initialized.") 241 255 … … 1154 1168 wrapper.exportJobInfo() # re-exports in case it was overwritten 1155 1169 retcode = wrapper.mainWork() 1170 except KeyboardInterrupt : 1171 wrapper.printInfo(_("Job %s interrupted by the administrator !") % wrapper.JobId, "warn") 1172 retcode = 0 1156 1173 except SystemExit, e : 1157 1174 retcode = e.code -
pykota/trunk/NEWS
r2623 r2624 24 24 - 1.24alpha7 : 25 25 26 - The cupspykota backend wrapper now accepts to be interrupted 27 with a kill -INT. This causes an immediate and clean abort 28 of the current print job. 29 26 30 - Matt Hyclak contributed the possibility to store the printing 27 31 history in a MySQL database. See the contributed/ directory