aboutsummaryrefslogtreecommitdiff
path: root/proc/proc.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-08-15 09:37:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-08-29 01:50:28 +0200
commit07031c67ab7e282e7af943f0774288922142f56c (patch)
tree5ceb09166b097fadd618dcf570a5b76262d0f5f7 /proc/proc.h
parentecceb56c6581b5eddf240112da7052e1d2f96af7 (diff)
downloadhurd-07031c67ab7e282e7af943f0774288922142f56c.tar.gz
hurd-07031c67ab7e282e7af943f0774288922142f56c.tar.bz2
hurd-07031c67ab7e282e7af943f0774288922142f56c.zip
proc: add proc_mark_important server code
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original patch set out to address, namely that killall5 freezes the proc translator before it tries to walk over /proc/*/stat to decide which process to kill. Prior to this patch (and the one marking the procfs server as important process), killall5 would deadlock trying to walk over the proc file system. Ironically it would not have killed any process later on even if it had the chance, since two values obtained from /proc/*/stat are currently hardcoded to zero in our procfs. Patches addressing the problem as a whole are prepared and will be sent as a follow up. * proc/proc.h (struct proc): Add p_important field. * proc/pgrp.c (S_proc_getpgrppids): Exclude important system processes. (S_proc_mark_important): New function. * proc/mgt.c (create_startup_proc): Mark init as important.
Diffstat (limited to 'proc/proc.h')
-rw-r--r--proc/proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc/proc.h b/proc/proc.h
index b7a95662..ed47cccb 100644
--- a/proc/proc.h
+++ b/proc/proc.h
@@ -84,6 +84,7 @@ struct proc
unsigned int p_noowner:1; /* has no owner known */
unsigned int p_loginleader:1; /* leader of login collection */
unsigned int p_dead:1; /* process is dead */
+ unsigned int p_important:1; /* has called proc_mark_important */
};
typedef struct proc *pstruct_t;