commit c36e6bbe9366b30c5b072997698e4e78947b446f
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Dec 3 20:31:03 2022 +0100

    startup: Make essential tasks essential to mach
    
    Whenever a Hurd essential task crashes, startup just reboots the system
    since there's not much that can be done at that point. When we have a
    kernel debugger, however, we could at least get crashing information, so
    let's make Hurd's startup tell the kernel which tasks are essential, so
    it can trigger the debugger whenever they crash.

Index: hurd-debian/startup/Makefile
===================================================================
--- hurd-debian.orig/startup/Makefile
+++ hurd-debian/startup/Makefile
@@ -36,6 +36,9 @@ fsServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOT
 ioServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
 startup-CPPFLAGS=-DLIBEXECDIR=\"${libexecdir}\"
 
+MIGSTUBS = gnumachUser.o
+OBJS += $(MIGSTUBS)
+
 include ../Makeconf
 
 mung_msg_S.h: msg_S.h
diff --git a/startup/startup.c b/startup/startup.c
index 1e3a65fb..e8c76d80 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -1493,6 +1493,8 @@ S_startup_essential_task (mach_port_t server,
   if (fail)
     return fail;
 
+  task_set_essential (task, TRUE);
+
   /* Always deallocate the extra reference this message carries.  */
   if (MACH_PORT_VALID (credential))
     mach_port_deallocate (mach_task_self (), credential);
