[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 11/28: startup: Dump processes if we cannot find the kernel.
From: |
Samuel Thibault |
Subject: |
[hurd] 11/28: startup: Dump processes if we cannot find the kernel. |
Date: |
Wed, 16 Nov 2016 08:30:26 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 34b5aa167da439900c4c1d1bb45b642b47d9a572
Author: Justus Winter <address@hidden>
Date: Tue Nov 1 14:38:27 2016 +0100
startup: Dump processes if we cannot find the kernel.
* startup/startup.c (dump_processes): New function.
(frob_kerne_process): Use the new function.
---
startup/startup.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/startup/startup.c b/startup/startup.c
index f54de5e..2eba563 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -880,6 +880,23 @@ init_stdarrays ()
so the kernel command line can be read as for a normal Hurd process. */
void
+dump_processes (void)
+{
+ pid_t pid;
+ for (pid = 1; pid < 100; pid++)
+ {
+ char args[256], *buffer = args;
+ size_t len = sizeof args;
+ if (proc_getprocargs (procserver, pid, &buffer, &len) == 0)
+ {
+ fprintf (stderr, "pid%d\t%s\n", (int) pid, buffer);
+ if (buffer != args)
+ vm_deallocate (mach_task_self (), (vm_offset_t) buffer, len);
+ }
+ }
+}
+
+void
frob_kernel_process (void)
{
error_t err;
@@ -904,7 +921,10 @@ frob_kernel_process (void)
/* Make the kernel our child. */
err = proc_child (procserver, task);
if (err)
- error (0, err, "cannot make the kernel our child");
+ {
+ error (0, err, "cannot make the kernel our child");
+ dump_processes ();
+ }
err = proc_task2proc (procserver, task, &proc);
if (err)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (341f43d -> 385d9bf), Samuel Thibault, 2016/11/16
- [hurd] 06/28: libdiskfs: fix removal of socket nodes, Samuel Thibault, 2016/11/16
- [hurd] 01/28: libdiskfs: Fix timestamp update on file close, Samuel Thibault, 2016/11/16
- [hurd] 04/28: wire console display pages, Samuel Thibault, 2016/11/16
- [hurd] 02/28: libdiskfs: Make utimes RPC flush pending timestamp updates, Samuel Thibault, 2016/11/16
- [hurd] 11/28: startup: Dump processes if we cannot find the kernel.,
Samuel Thibault <=
- [hurd] 03/28: Fix typo, Samuel Thibault, 2016/11/16
- [hurd] 12/28: boot: Use the smallest possible name when inserting rights., Samuel Thibault, 2016/11/16
- [hurd] 15/28: boot: restore terminal state on exit, Samuel Thibault, 2016/11/16
- [hurd] 18/28: boot: Tidy up the argument parser., Samuel Thibault, 2016/11/16
- [hurd] 24/28: eth-multiplexer: Avoid local definitions., Samuel Thibault, 2016/11/16
- [hurd] 28/28: libpager: fix returning error on data_unlock, Samuel Thibault, 2016/11/16
- [hurd] 08/28: proc: Fix new task notifications., Samuel Thibault, 2016/11/16
- [hurd] 19/28: Adjust to the fixed new task notifications., Samuel Thibault, 2016/11/16
- [hurd] 22/28: eth-multiplexer: Fix packet delivery., Samuel Thibault, 2016/11/16
- [hurd] 16/28: boot: Allow unprivileged users to boot Subhurds., Samuel Thibault, 2016/11/16