pm - fix sched interaction
For coredumping processes, PM forgets to inform SCHED that the process has vanished, causing future fork()s to fail.
This commit is contained in:
parent
77d5243f4a
commit
bcdaf033b5
2 changed files with 11 additions and 11 deletions
|
@ -364,6 +364,17 @@ int dump_core; /* flag indicating whether to dump core */
|
|||
*/
|
||||
int r;
|
||||
|
||||
if((r = sched_stop(rmp)) != OK) {
|
||||
/* If the scheduler refuses to give up scheduling, there is
|
||||
* little we can do, except report it. This may cause problems
|
||||
* later on, if this scheduler is asked to schedule another proc
|
||||
* that has an endpoint->schedproc mapping identical to the proc
|
||||
* we just tried to stop scheduling.
|
||||
*/
|
||||
printf("PM: The scheduler did not want to give up "
|
||||
"scheduling %s, ret=%d.\n", rmp->mp_name, r);
|
||||
}
|
||||
|
||||
/* For core dumps, now is the right time to try to contact the parent. */
|
||||
if (dump_core)
|
||||
zombify(rmp);
|
||||
|
|
|
@ -479,17 +479,6 @@ PRIVATE void handle_fs_reply()
|
|||
break;
|
||||
|
||||
case PM_EXIT_REPLY:
|
||||
if((r = sched_stop(rmp)) != OK) {
|
||||
/* If the scheduler refuses to give up scheduling, there is
|
||||
* little we can do, except report it. This may cause problems
|
||||
* later on, if this scheduler is asked to schedule another proc
|
||||
* that has an endpoint->schedproc mapping identical to the proc
|
||||
* we just tried to stop scheduling.
|
||||
*/
|
||||
printf("PM: The scheduler did not want to give up "
|
||||
"scheduling %s, ret=%d.\n", rmp->mp_name, r);
|
||||
}
|
||||
|
||||
exit_restart(rmp, FALSE /*dump_core*/);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue