On Mon, 27.10.14 20:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:

> On Mon, Oct 27, 2014 at 06:49:22PM +0100, Lennart Poettering wrote:
> > > +                log_info("Active jobs (%u running):\n\t%s.", 
> > > m->n_running_jobs, all);
> > > +        } else
> > > +                log_info("No jobs seem to be running.");
> > > +
> > > +        return 0;
> > > +}
> > 
> > A long-standing TODO list item has been to print something like this
> > if the user hits C-A-Del 3 times within 1s or so (under the assumption
> > that he might do this if shutdown gets stuck for some reason). If we have
> > this function in place, maybe that's something to quickly hookup with
> > C-A-Del too? (using the ratelimit infrastruturce should make the patch
> > for detecting the 3-times-within-1s thing trivial)...
>
> I'd prefer to reserve c-a-del×3 for reboot-force now. Maybe we
> could use ^C for status instead? Or even simply 's'? As long as
> we haven't launched anything using the tty, we could interpret the
> keystrokes.

Hmm, I kinda like the fact that the C-A-Del stuff completely bypasses
the console and is handed to us directly from the kernel. I'd thus
prefer if we could stick to it. That said, force-reboot makes a lot of
sense to attach to C-a-d too? Maybe a logic like this:

- press it once, and a clean shutdown is initiated
- press it thrice, and the current job list is displayed, plus a short
  hint that pressing it seven times will result in a forced reboot
- press it seven times and we initiate a forced reboot

(Not tied to the 7 times, could be 5, or 10, or whatever...)

Seems kinda natural to me to have this scheme where we as first
emergency step we have useful information, and then as second step we
actually just reset things.

Does this make sense?

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to