Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 352820 Details for
Bug 476104
load-average reschedules immediately after 'fg' SIGCONT
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Untested 'concept' patch
sigcont_not_tested.patch (text/plain), 1.34 KB, created by
Tomáš "tpruzina" Pružina (amd64 [ex]AT)
on 2013-07-08 00:01:02 UTC
(
hide
)
Description:
Untested 'concept' patch
Filename:
MIME Type:
Creator:
Tomáš "tpruzina" Pružina (amd64 [ex]AT)
Created:
2013-07-08 00:01:02 UTC
Size:
1.34 KB
patch
obsolete
>diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py >index 94d3d3f..91fc547 100644 >--- a/pym/_emerge/Scheduler.py >+++ b/pym/_emerge/Scheduler.py >@@ -154,6 +154,7 @@ class Scheduler(PollScheduler): > self.target_root = settings["EROOT"] > self.trees = trees > self.myopts = myopts >+ self.timestamp = time.clock() > self._spinner = spinner > self._mtimedb = mtimedb > self._favorites = favorites >@@ -1006,6 +1007,14 @@ class Scheduler(PollScheduler): > earlier_sigint_handler = signal.signal(signal.SIGINT, sighandler) > earlier_sigterm_handler = signal.signal(signal.SIGTERM, sighandler) > >+ # handles SIGCONT when working with --jobs >+ # this prevents schedule_tasks from rescheduling too >+ # early after SIGCONT >+ # this should delay rescheduling by about >5 seconds >+ def sigcont_handler(self): >+ if self._jobs and self._max_load is not None: >+ self.timestamp = time.clock() + 5.0 >+ > try: > rval = self._merge() > finally: >@@ -1542,6 +1551,12 @@ class Scheduler(PollScheduler): > def _schedule_tasks(self): > > while True: >+ # Sleep if timestamp is 'in future', this prevents >+ # scheduler to reschedule after SIGCONT signal >+ # signal handler should set this to 'near future' >+ if self._jobs and self._max_load is not None: >+ while (self.timestamp > time.clock()): >+ time.sleep(1) > > state_change = 0 >
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 476104
: 352820