diff options
author | Justus Winter <justus@gnupg.org> | 2017-03-09 23:55:12 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-03-11 18:07:23 +0100 |
commit | 34a94ce86b1bada9c0768f631540735d44f41100 (patch) | |
tree | c0e2871ecb2466ea001d9be505b05fdc10702087 /proc/proc.h | |
parent | baf7e5c8ce176aead15c2559952d8bdf0da41ffd (diff) | |
download | hurd-34a94ce86b1bada9c0768f631540735d44f41100.tar.gz hurd-34a94ce86b1bada9c0768f631540735d44f41100.tar.bz2 hurd-34a94ce86b1bada9c0768f631540735d44f41100.zip |
proc: Hierarchical proc servers.
Previously, a Subhurd's tasks were shown as weird processes in the
Motherhurd. This change connects the proc server in the Motherhurd
with the proc server in the Subhurd, embedding the Subhurd's process
hierarchy. Subhurd's processes can now be inspected and debugged like
any other process.
* NEWS: Update.
* boot/boot.c (mach_msg_forward): New function.
(boot_demuxer): Forward messages arriving on the new task notification
port from the proc server, and forward them to the proc server inside
the Subhurd via the notification port.
* proc/info.c (S_proc_task2proc): Relay request for processes in a task
namespace to the Subhurd's proc server.
(S_proc_pid2proc): Likewise.
(S_proc_getprocargs): Likewise.
(S_proc_getprocenv): Likewise.
(S_proc_getprocinfo): Likewise. Translate PIDs.
(S_proc_getloginid): Likewise.
(S_proc_getloginpids): Likewise.
* proc/mgt.c (namespace_is_subprocess): New function.
(namespace_translate_pids): Likewise.
* proc/msg.c (S_proc_getmsgport): Relay request for processes in a task
namespace to the Subhurd's proc server.
* proc/pgrp.c (S_proc_getsid): Likewise. Translate PIDs.
(S_proc_getsessionpids): Likewise.
(S_proc_getsessionpgids): Likewise.
(S_proc_getpgrppids): Likewise.
* proc/proc.h (namespace_is_subprocess): New prototype.
(namespace_translate_pids): Likewise.
Diffstat (limited to 'proc/proc.h')
-rw-r--r-- | proc/proc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/proc/proc.h b/proc/proc.h index c0696149..333e8840 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -201,6 +201,8 @@ void leave_pgrp (struct proc *); void join_pgrp (struct proc *); void boot_setsid (struct proc *); +int namespace_is_subprocess (struct proc *p); +error_t namespace_translate_pids (mach_port_t namespace, pid_t *pids, size_t pids_len); struct proc *namespace_find_root (struct proc *); void process_has_exited (struct proc *); void alert_parent (struct proc *); |