aboutsummaryrefslogtreecommitdiff
path: root/proc/main.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-09-16 16:09:05 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-10 13:35:17 +0100
commit46b2c2b071f31893c9ce9548537e34747b2941d6 (patch)
tree30bf0c4086923410b994da0ec09691f690203a38 /proc/main.c
parent09ff61acc11cd495af5f4cba1f9a1f850c6745c9 (diff)
downloadhurd-46b2c2b071f31893c9ce9548537e34747b2941d6.tar.gz
hurd-46b2c2b071f31893c9ce9548537e34747b2941d6.tar.bz2
hurd-46b2c2b071f31893c9ce9548537e34747b2941d6.zip
proc: register for new task notifications
* proc/Makefile (MIGSTUBS): Add `gnumachServer.o'. * proc/main.c (message_demuxer): Handle the `task_notify' protocol. (main): Register for new task notificatinos. * proc/mgt.c (S_mach_notify_new_task): Add server function.
Diffstat (limited to 'proc/main.c')
-rw-r--r--proc/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/proc/main.c b/proc/main.c
index 3419d44d..b4288fbc 100644
--- a/proc/main.c
+++ b/proc/main.c
@@ -31,6 +31,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <pids.h>
#include "proc.h"
+#include "gnumach_U.h"
const char *argp_program_version = STANDARD_HURD_VERSION (proc);
@@ -38,6 +39,7 @@ const char *argp_program_version = STANDARD_HURD_VERSION (proc);
#include "notify_S.h"
#include "../libports/interrupt_S.h"
#include "proc_exc_S.h"
+#include "task_notify_S.h"
int
message_demuxer (mach_msg_header_t *inp,
@@ -47,7 +49,8 @@ message_demuxer (mach_msg_header_t *inp,
if ((routine = process_server_routine (inp)) ||
(routine = notify_server_routine (inp)) ||
(routine = ports_interrupt_server_routine (inp)) ||
- (routine = proc_exc_server_routine (inp)))
+ (routine = proc_exc_server_routine (inp)) ||
+ (routine = task_notify_server_routine (inp)))
{
pthread_mutex_lock (&global_lock);
(*routine) (inp, outp);
@@ -152,6 +155,12 @@ main (int argc, char **argv, char **envp)
if (err)
error (0, err, "Increasing priority failed");
+ err = register_new_task_notification (_hurd_host_priv,
+ generic_port,
+ MACH_MSG_TYPE_MAKE_SEND);
+ if (err)
+ error (0, err, "Registering task notifications failed");
+
{
/* Get our stderr set up to print on the console, in case we have
to panic or something. */