diff options
author | Justus Winter <justus@gnupg.org> | 2016-08-08 18:01:32 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-08-08 18:04:07 +0200 |
commit | 1912e6a69419d4448795ae1451c7b7c57ac16a52 (patch) | |
tree | ec05204fe458aa9c661033b34cd064428d0514af | |
parent | 0e3a795af98b6441d0a9928036e140978511e272 (diff) |
startup: Make the kernel a child of startup.
* startup/startup.c (frob_kernel_process): Make the kernel a child of
startup, improve error reporting.
-rw-r--r-- | startup/startup.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/startup/startup.c b/startup/startup.c index 30984542..49ba9ce4 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -900,6 +900,12 @@ frob_kernel_process (void) error (0, err, "cannot get kernel task port"); return; } + + /* Make the kernel our child. */ + err = proc_child (procserver, task); + if (err) + error (0, err, "cannot make the kernel our child"); + err = proc_task2proc (procserver, task, &proc); if (err) { @@ -910,7 +916,9 @@ frob_kernel_process (void) /* Mark the kernel task as an essential task so that we or the proc server never want to task_terminate it. */ - proc_mark_important (proc); + err = proc_mark_important (proc); + if (err) + error (0, err, "cannot mark the kernel as important"); err = record_essential_task ("kernel", task); assert_perror (err); |