[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5690 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2013-08-28 23:59:08 +0000 (Wed, 28 Aug 2013)
New Revision: 5690

Added:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-startup-pid2.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/hurd-i386/submitted-startup-pid2.diff: New patch from Justus
    Winter to prepare reboot() for /hurd/init getting PID 2 instead of 1.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2013-08-28 20:28:18 UTC (rev 5689)
+++ glibc-package/trunk/debian/changelog	2013-08-28 23:59:08 UTC (rev 5690)
@@ -9,6 +9,8 @@
     Richard Braun to work around applications which do not like micro-second
     clock_t, such as guile.
   * Update hurd-i386 testsuite progressions.
+  * patches/hurd-i386/submitted-startup-pid2.diff: New patch from Justus
+    Winter to prepare reboot() for /hurd/init getting PID 2 instead of 1.
 
  -- Adam Conrad <adconrad@0c3.net>  Thu, 01 Aug 2013 23:00:51 +0100
 

Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-startup-pid2.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-startup-pid2.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-startup-pid2.diff	2013-08-28 23:59:08 UTC (rev 5690)
@@ -0,0 +1,51 @@
+http://sourceware.org/ml/libc-alpha/2013-08/msg00205.html
+
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+To: libc-alpha@sourceware.org
+Subject: [PATCH 1/2] Hurd: make reboot() send messages to both pid 1 and 2
+Date: Thu, 15 Aug 2013 10:43:34 +0200
+
+Previously /hurd/init was run as pid 1 on Hurd systems, however
+sysvinit assumes that it is being run as pid 1. To appease sysvinit,
+/hurd/init will be run as pid 2 in the near future.
+
+Currently the pid of /hurd/init is hardcoded to 1. This patch makes
+reboot() try to send the start_reboot message to pid 1, and if that
+fails it will send it to pid 2.
+
+* sysdeps/mach/hurd/reboot.c (reboot): Try to send a startup_reboot
+  message to both pid 1 and 2.
+---
+ ChangeLog                  |    5 +++++
+ sysdeps/mach/hurd/reboot.c |   13 +++++++++----
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/sysdeps/mach/hurd/reboot.c b/sysdeps/mach/hurd/reboot.c
+index 60d96ea..e23215a 100644
+--- a/sysdeps/mach/hurd/reboot.c
++++ b/sysdeps/mach/hurd/reboot.c
+@@ -33,11 +33,16 @@ reboot (int howto)
+   if (err)
+     return __hurd_fail (EPERM);
+ 
+-  err = __USEPORT (PROC, __proc_getmsgport (port, 1, &init));
+-  if (!err)
++  for (pid_t pid = 1; pid < 3; pid++)
+     {
+-      err = __startup_reboot (init, hostpriv, howto);
+-      __mach_port_deallocate (__mach_task_self (), init);
++      err = __USEPORT (PROC, __proc_getmsgport (port, pid, &init));
++      if (!err)
++	{
++	  err = __startup_reboot (init, hostpriv, howto);
++	  __mach_port_deallocate (__mach_task_self (), init);
++	  if (!err)
++	    break;
++	}
+     }
+ 
+   __mach_port_deallocate (__mach_task_self (), hostpriv);
+-- 
+1.7.10.4
+
+

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2013-08-28 20:28:18 UTC (rev 5689)
+++ glibc-package/trunk/debian/patches/series	2013-08-28 23:59:08 UTC (rev 5690)
@@ -126,6 +126,7 @@
 hurd-i386/tg-poll_errors_fixes.diff
 hurd-i386/tg-context_functions.diff
 hurd-i386/unsubmitted-clock_t_centiseconds.diff
+hurd-i386/submitted-startup-pid2.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff


Reply to: