Hacker News new | ask | show | jobs
by nishanths 1215 days ago
Tangentially I derelish rambling errors.

This is Debian 11 attempting a reboot as a regular user:

  $ reboot
  Failed to set wall message, ignoring: Access denied
  Failed to reboot system via logind: Access denied
  Failed to open initctl fifo: Permission denied
  Failed to talk to init daemon.
  $ 
Compare with macOS:

  $ reboot
  reboot: Operation not permitted
  $ 
and OpenBSD:

  $ reboot
  Operation not permitted
  $ 
edit: s/meandering/rambling
1 comments

Those are not meandering errors, those are each subsystem that can invoke the steps of the shutdown failing.

Meandering errors to you are important messages to those who care enough to interpret them.

But shutdown/reboot/halt could well check the pre-requisite user id (or other kinds of permissions needed for you to be allowed to reboot/stop the system) before invoking all those subsystems which all run on as if they were going to succeed when they are not.

And would it not be very weird if 2/3 managed to run, sending wall messages to everyone, preventing new logins and so forth but then not rebooting? Or not preventing new logins, not sending the message but still reboot?

All of those "corner cases", including the quoted permission denied messages, could well be prevented but are not.

Never said it was a corner case.