Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 159642 Details for
Bug 241278
kill yum should kill yum
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Make yum listen to signals
yum-exit-on-signal.patch (text/plain), 1.84 KB, created by
Panu Matilainen
on 2007-07-20 11:27:08 UTC
(
hide
)
Description:
Make yum listen to signals
Filename:
MIME Type:
Creator:
Panu Matilainen
Created:
2007-07-20 11:27:08 UTC
Size:
1.84 KB
patch
obsolete
>Index: output.py >=================================================================== >RCS file: /home/groups/yum/cvs/yum/output.py,v >retrieving revision 1.79 >diff -u -r1.79 output.py >--- output.py 28 Jun 2007 15:37:01 -0000 1.79 >+++ output.py 20 Jul 2007 11:14:44 -0000 >@@ -25,9 +25,15 @@ > from urlgrabber.progress import TextMeter > from urlgrabber.grabber import URLGrabError > from yum.misc import sortPkgObj, prco_tuple_to_string >+from rpmUtils.miscutils import checkSignals > > from yum import logginglevels > >+class YumTextMeter(TextMeter): >+ def update(self, amount_read, now=None): >+ checkSignals() >+ TextMeter.update(self, amount_read, now) >+ > class YumOutput: > > def __init__(self): >@@ -329,7 +335,7 @@ > self.repos.setProgressBar(None) > self.repos.callback = None > else: >- self.repos.setProgressBar(TextMeter(fo=sys.stdout)) >+ self.repos.setProgressBar(YumTextMeter(fo=sys.stdout)) > self.repos.callback = CacheProgressCallback() > > # setup our failure report for failover >Index: rpmUtils/miscutils.py >=================================================================== >RCS file: /home/groups/yum/cvs/yum/rpmUtils/miscutils.py,v >retrieving revision 1.21 >diff -u -r1.21 miscutils.py >--- rpmUtils/miscutils.py 7 Apr 2007 18:23:15 -0000 1.21 >+++ rpmUtils/miscutils.py 20 Jul 2007 11:14:44 -0000 >@@ -21,6 +21,7 @@ > import os > import sys > import locale >+import signal > > import rpmUtils.transaction > >@@ -357,3 +358,13 @@ > > os.close(fdno) > return hdr >+ >+def checkSignals(): >+ if hasattr(rpm, "checkSignals"): >+ if rpm.signalsCaught([signal.SIGINT, >+ signal.SIGTERM, >+ signal.SIGPIPE, >+ signal.SIGQUIT, >+ signal.SIGHUP]): >+ exit(1) >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241278
: 159642