[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 36/70: hurd: add proc_mark_important
From: |
Samuel Thibault |
Subject: |
[hurd] 36/70: hurd: add proc_mark_important |
Date: |
Mon, 16 Sep 2013 07:41:41 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 5f536bc5ae7948555af12b105a97aa887fe5da48
Author: Justus Winter <address@hidden>
Date: Thu Aug 15 09:37:57 2013 +0200
hurd: add proc_mark_important
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.
* hurd/process.defs (proc_mark_important): New routine definitions.
* hurd/process_reply.defs (proc_mark_important_request): Likewise.
* hurd/process_request.defs (proc_mark_important_request): Likewise.
---
hurd/process.defs | 11 ++++++++++-
hurd/process_reply.defs | 9 ++++++++-
hurd/process_request.defs | 12 +++++++++++-
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/hurd/process.defs b/hurd/process.defs
index c74031a..b7e1775 100644
--- a/hurd/process.defs
+++ b/hurd/process.defs
@@ -1,5 +1,5 @@
/* Definitions for process server interface
- Copyright (C) 1992,93,94,95,96,97,2001 Free Software Foundation
+ Copyright (C) 1992,93,94,95,96,97,2001,2013 Free Software Foundation
This file is part of the GNU Hurd.
@@ -374,3 +374,12 @@ routine proc_getnports (
/*** Routines related to early server bootstrapping ***/
skip; /* Reserved for proc_set_init_task */
+
+/* Inform the process server that the process is important. */
+routine proc_mark_important (
+ process: process_t);
+
+/* Query whether the process is important. */
+routine proc_is_important (
+ process: process_t;
+ out essential: boolean_t);
diff --git a/hurd/process_reply.defs b/hurd/process_reply.defs
index bea0064..38f2082 100644
--- a/hurd/process_reply.defs
+++ b/hurd/process_reply.defs
@@ -1,5 +1,5 @@
/* Reply half of wait
- Copyright (C) 1991,93,94,96,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991,93,94,96,2001,13 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -178,3 +178,10 @@ simpleroutine proc_getnports (
/*** Routines related to early server bootstrapping ***/
skip; /* Reserved for proc_set_init_task */
+skip; /* proc_mark_important */
+
+simpleroutine proc_is_important (
+ reply_port: reply_port_t;
+ RETURN_CODE_ARG;
+ essential: boolean_t);
+
diff --git a/hurd/process_request.defs b/hurd/process_request.defs
index e36b367..3ef7353 100644
--- a/hurd/process_request.defs
+++ b/hurd/process_request.defs
@@ -1,6 +1,6 @@
/* Definitions for process server interface (request-only version)
- Copyright (C) 1992, 93, 94, 95, 96, 98 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 98, 2013 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -375,3 +375,13 @@ simpleroutine proc_getnports_request (
/*** Routines related to early server bootstrapping ***/
skip; /* Reserved for proc_set_init_task */
+
+/* Inform the process server that the process is important. */
+simpleroutine proc_mark_important_request (
+ process: process_t;
+ ureplyport reply: reply_port_t);
+
+/* Query whether the process is important. */
+simpleroutine proc_is_important_request (
+ process: process_t;
+ ureplyport reply: reply_port_t);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 35/70: proc: add proc_mark_important server code, (continued)
- [hurd] 35/70: proc: add proc_mark_important server code, Samuel Thibault, 2013/09/16
- [hurd] 20/70: tmpfs: drop privileges in the tmpfs translator, Samuel Thibault, 2013/09/16
- [hurd] 27/70: daemons: fix setsid(2) in console-run, Samuel Thibault, 2013/09/16
- [hurd] 14/70: Optimize translator string copy, Samuel Thibault, 2013/09/16
- [hurd] 13/70: libnetfs: properly respond to file_get_translator requests, Samuel Thibault, 2013/09/16
- [hurd] 23/70: Do not build gzip/bzip2 support, Samuel Thibault, 2013/09/16
- [hurd] 38/70: libdiskfs: register libdiskfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 34/70: proc: make the function check_owner available, Samuel Thibault, 2013/09/16
- [hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec servers., Samuel Thibault, 2013/09/16
- [hurd] 40/70: libtrivfs: register libtrivfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 36/70: hurd: add proc_mark_important,
Samuel Thibault <=
- [hurd] 43/70: Fix build, Samuel Thibault, 2013/09/16
- [hurd] 46/70: proc: keep track of {start,end}_code, Samuel Thibault, 2013/09/16
- [hurd] 45/70: Fix variable names, Samuel Thibault, 2013/09/16
- [hurd] 25/70: exec: remove the BFD code, Samuel Thibault, 2013/09/16
- [hurd] 26/70: hurd: add missing routines in process_reply.defs, Samuel Thibault, 2013/09/16
- [hurd] 63/70: trans/symlink.c: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 60/70: libdiskfs: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 56/70: libnetfs: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 41/70: mach-defpager: register mach-defpager translators as important, Samuel Thibault, 2013/09/16
- [hurd] 62/70: libtrivfs: add fsys_get_source, Samuel Thibault, 2013/09/16