x11/ly: use init signals for graceful shutdown and reboot
This change replaces direct reboot system calls with SIGUSR2 and SIGINT
signals sent to PID 1 (see init(8)). Direct reboot system calls can
cause abrupt process termination, bypassing the normal FreeBSD shutdown
procedure.
ntpd[24311]: ntpd exiting on signal 15 (Terminated)
kernel: pid 1090 (pulseaudio), jid 0, uid 1001: exited on signal 6 (no core dump - other error)
syslogd: exiting on signal 15
Delegating these operations to init allows the system to perform an
orderly shutdown or reboot, giving running processes the opportunity to
terminate gracefully.
PR: 301245
Approved by: makc (mentor)
Approved by: arrowd (co-mentor)