[Bug 142434] [patch] Add cpuset(1) support to rc.subr(8)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 11 May 2023 11:57:59 UTC

--- Comment #14 from Miroslav Lachman <000.fbsd@quip.cz> ---
13 years after my initial patch submission :) Thank you for taking care of it!

I noticed you committed with my debugging code + comment.

   # for cpuset debug only, not committable (cut)
   if [ -n "$_cpuset" -a -x $CPUSET ]; then
       echo -n "on CPU(s)"
       $CPUSET -g -p "$rc_pid" | cut -s -d: -f 2

I think this information is really useful for "status" and should be there, but
I was not sure if it is OK to use pipe and cut (utilities from /usr/bin). Maybe
it is OK because now I see "kldstat -v | egrep -q -e" elsewhere in rc.subr. 
(I think egrep is not recommended and should be grep -E for compatibility)
Back to topic - if it is good to have this code in rc.subr, please remove the
comment line: 
"# for cpuset debug only, not committable (cut)"

And I would like to ask if anyone has tested it with the current rc.d/jail? I
remember it did not work with jail 13 years ago, but a lot has changed in that
time. I don't know if it will work or if it will just silently not set cpuset
without breaking anything or jail will not start at all. Just to be on the safe

You are receiving this mail because:
You are on the CC list for the bug.