[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 06/75: random: use /servers/startup to register for shutdown noti
From: |
Samuel Thibault |
Subject: |
[hurd] 06/75: random: use /servers/startup to register for shutdown notifications |
Date: |
Thu, 14 Jan 2016 01:04:01 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 710201a5db7bcd1c13364eccca65d8b13c1d0d65
Author: Justus Winter <address@hidden>
Date: Fri Nov 6 12:06:32 2015 +0100
random: use /servers/startup to register for shutdown notifications
* random/random.c (arrange_shutdown_notification): Use the new way to
contact the startup server.
---
random/random.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/random/random.c b/random/random.c
index f483a5d..f926b7f 100644
--- a/random/random.c
+++ b/random/random.c
@@ -17,6 +17,7 @@
#define _GNU_SOURCE 1
+#include <hurd/paths.h>
#include <hurd/trivfs.h>
#include <hurd/startup.h>
#include <stdio.h>
@@ -557,7 +558,6 @@ arrange_shutdown_notification ()
{
error_t err;
mach_port_t initport, notify;
- process_t procserver;
struct port_info *pi;
shutdown_notify_class = ports_create_class (0, 0);
@@ -572,14 +572,9 @@ arrange_shutdown_notification ()
if (err)
return err;
- procserver = getproc ();
- if (! MACH_PORT_VALID (procserver))
- return EMIG_SERVER_DIED;
-
- err = proc_getmsgport (procserver, 1, &initport);
- mach_port_deallocate (mach_task_self (), procserver);
- if (err)
- return err;
+ initport = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (! MACH_PORT_VALID (initport))
+ return errno;
notify = ports_get_send_right (pi);
ports_port_deref (pi);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch dde updated (c7fdc30 -> cb08549), Samuel Thibault, 2016/01/13
- [hurd] 04/75: random: fix odd formatting, Samuel Thibault, 2016/01/13
- [hurd] 06/75: random: use /servers/startup to register for shutdown notifications,
Samuel Thibault <=
- [hurd] 07/75: random: satisfy arbitrarily-sized reads, Samuel Thibault, 2016/01/13
- [hurd] 08/75: libihash: add hurd_ihash_value_valid, Samuel Thibault, 2016/01/13
- [hurd] 10/75: libihash: prefer performance degradation over failure, Samuel Thibault, 2016/01/13
- [hurd] 11/75: Make dde conditionally built under presence of libpciaccess, Samuel Thibault, 2016/01/13
- [hurd] 13/75: Clean debugging macro, Samuel Thibault, 2016/01/13
- [hurd] 09/75: libihash: optimize lookup-or-insert operations, Samuel Thibault, 2016/01/13
- [hurd] 03/75: Remove unused variables, Samuel Thibault, 2016/01/13
- [hurd] 17/75: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into dde, Samuel Thibault, 2016/01/13
- [hurd] 19/75: Add devnode documentation, Samuel Thibault, 2016/01/13
- [hurd] 23/75: Add missing menus, Samuel Thibault, 2016/01/13