set_rcvar() function use?

Pavel Timofeev timp87 at gmail.com
Sun Jul 5 08:36:47 UTC 2020


сб, 4 июл. 2020 г. в 08:11, Hiroki Sato <hrs at freebsd.org>:

> Mateusz Piotrowski <0mp at FreeBSD.org> wrote
>   in <34921b6e-ce3a-13e4-0cc1-3ca47b5a9cef at FreeBSD.org>:
>
> 0m> >  I am planning to revisit the multi-instance support shortly because
> I
> 0m> >  am using it for a long time and I think it is useful.  While I did
> 0m> >  not receive a strong objection to it so far, it is also true that
> 0m> >  adopting the set_rcvar() style was not discussed properly.  I would
> 0m> >  like more feedback before moving forward.
> 0m>
> 0m> AFAIR, manu@ was concerned at some point that using set_rcvar()
> extensively
> 0m> might result in slowdowns on embedded systems.
>
>  A discussion in the past about the performance was an additional
>  fork(2) when using set_rcvar() for rc_var=`set_rcvar`.  The use case
>  of the resurrected one is "set_rcvar A B" as a replacement of "A=B",
>  and it does not involve a subshell.
>
>  I agree that the performance perspective should also be discussed,
>  though.  The current rc.subr and network.subr already have more
>  expensive operations, so we might want to gather profiling
>  information.
>
>
Thanks a lot for the answers!

It's great that the only existed concern is not a problem anymore for the
resurrected "set_rcvar A B" form.
IMO features like setting variable description and ability to "ask" rc
script what variables/options are available are really great even without
multi-instance support.


More information about the freebsd-ports mailing list