This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PING: [PATCH] hurd: Get a startup server port from a file instead of a PID
- From: David Michael <fedora dot dm0 at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: Roland McGrath <roland at hack dot frob dot com>
- Date: Sun, 15 Feb 2015 14:20:37 -0500
- Subject: PING: [PATCH] hurd: Get a startup server port from a file instead of a PID
- Authentication-results: sourceware.org; auth=none
Ping (and adding Roland to CC--forgot the first time)
On Sun, Feb 1, 2015 at 3:33 PM, David Michael <fedora.dm0@gmail.com> wrote:
> To allow easier implementation of different init systems, Hurd no
> longer requires PID 1 to speak the startup protocol. Ports to the
> startup server are now obtained from /servers/startup instead.
> ---
>
> Hi,
>
> This patch has been included in Hurd's glibc branch and Debian's libc
> for a while, and we'd like to have it applied upstream.
>
> I haven't submitted copyright assignment papers for glibc, but I don't
> believe this change is legally significant. Let me know if I need to
> take care of copyright assignment for this.
>
> Thanks.
>
> David
>
> ChangeLog | 6 ++++++
> sysdeps/mach/hurd/reboot.c | 5 +++--
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 50e8153..9b0b580 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2015-02-01 David Michael <fedora.dm0@gmail.com>
> +
> + * sysdeps/mach/hurd/reboot.c: Include <hurd/paths.h>.
> + (reboot): Look up the file _SERVERS_STARTUP instead of PID 1 to get a
> + port to the startup server.
> +
> 2015-01-31 David S. Miller <davem@davemloft.net>
>
> * sysdeps/sparc/sparc32/bits/atomic.h
> diff --git a/sysdeps/mach/hurd/reboot.c b/sysdeps/mach/hurd/reboot.c
> index 654745b..cb59a2b 100644
> --- a/sysdeps/mach/hurd/reboot.c
> +++ b/sysdeps/mach/hurd/reboot.c
> @@ -18,6 +18,7 @@
> #include <errno.h>
> #include <unistd.h>
> #include <hurd.h>
> +#include <hurd/paths.h>
> #include <hurd/startup.h>
> #include <sys/reboot.h>
>
> @@ -33,8 +34,8 @@ reboot (int howto)
> if (err)
> return __hurd_fail (EPERM);
>
> - err = __USEPORT (PROC, __proc_getmsgport (port, 1, &init));
> - if (!err)
> + init = __file_name_lookup (_SERVERS_STARTUP, 0, 0);
> + if (init != MACH_PORT_NULL)
> {
> err = __startup_reboot (init, hostpriv, howto);
> __mach_port_deallocate (__mach_task_self (), init);
> --
> 2.1.0
>