From bcdaf033b586069d048a8d8dd06d700ca6fec281 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 19 May 2010 13:22:29 +0000 Subject: [PATCH] pm - fix sched interaction For coredumping processes, PM forgets to inform SCHED that the process has vanished, causing future fork()s to fail. --- servers/pm/forkexit.c | 11 +++++++++++ servers/pm/main.c | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/servers/pm/forkexit.c b/servers/pm/forkexit.c index 3406296c2..a7900800f 100644 --- a/servers/pm/forkexit.c +++ b/servers/pm/forkexit.c @@ -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); diff --git a/servers/pm/main.c b/servers/pm/main.c index 6047e382c..d2a55320c 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -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; -- 2.11.4.GIT