crash-handler: Drop 10s sleep before we spawn the crash shell

It pointlessly delays getting to the crash shell so let's drop the
10s sleep.
This commit is contained in:
Daan De Meyer 2024-08-07 20:48:09 +02:00
parent bc3477fdc5
commit 570a11eb9d
2 changed files with 2 additions and 6 deletions

View File

@ -843,9 +843,8 @@
<listitem><para>Takes a boolean argument or enables the option if specified
without an argument. If enabled, the system manager (PID 1) spawns a shell
when it crashes, after a 10s delay. Otherwise, no shell is spawned. Defaults
to disabled, for security reasons, as the shell is not protected by password
authentication.</para>
when it crashes. Otherwise, no shell is spawned. Defaults to disabled, for
security reasons, as the shell is not protected by password authentication.</para>
<xi:include href="version-info.xml" xpointer="v233"/></listitem>
</varlistentry>

View File

@ -155,9 +155,6 @@ _noreturn_ static void crash(int sig, siginfo_t *siginfo, void *context) {
(void) sigaction(SIGCHLD, &sa, NULL);
if (arg_crash_shell) {
log_notice("Executing crash shell in 10s...");
(void) sleep(10);
pid = raw_clone(SIGCHLD);
if (pid < 0)
log_struct_errno(LOG_EMERG, errno,