[Bug 282255] rc: Is rc_fast_and_loose actually working?
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Oct 2024 21:12:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282255 --- Comment #8 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ad360ff9b7fb2ef3f7f31b8c29c332026b0e01 commit a5ad360ff9b7fb2ef3f7f31b8c29c332026b0e01 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-10-23 12:57:29 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-28 21:10:49 +0000 rc: Remove rc_fast_and_loose The rc_fast_and_loose variable allowed rc(8) to start services by sourcing them into rc's own shell environment. Normally, each rc service script is started by being sourced into its own subshell instead. The feature was meant to speed up rc(8) by avoiding the extra forking necessary to spawn subshells. In practice, the feature has been broken for a long time now. One of the reasons is that some rc service scripts call the exit builtin to return non-zero error codes, which not only terminates the service subshell but also rc(8) when rc_fast_and_loose is enabled. For example, a system running any of the supported FreeBSD releases with rc_fast_and_loose=yes would abort rc(8) as early as rc.d/hostid, due to an "exit 0". Fixing rc_fast_and_loose support would require rewriting some rc scripts to support being sourced directly into rc(8) process. This would muddy the code base and also would prove difficult to maintain long term as this is simply not how rc(8) users write scripts. The potential performance benefits are unlikely to be significant even for use cases such as Morello under qemu. Instead, remove support for rc_fast_and_loose completely from rc(8) and inform users about the change. PR: 282255 Reviewed by: brooks, christos, mhorne Approved by: christos (mentor), markj (mentor) MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D47264 UPDATING | 7 +++++++ libexec/rc/rc.subr | 20 ++------------------ share/man/man8/rc.subr.8 | 36 +++++++++++------------------------- 3 files changed, 20 insertions(+), 43 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.