[systemd-devel] Waiting for (transient) hostname configuration

Kenneth Porter shiva at sewingwitch.com
Thu Apr 21 21:42:28 UTC 2022


On 4/20/2022 1:09 PM, Alessio Igor Bogani wrote:
> # ExecStart=/usr/bin/Starter %H
> ExecStart=/bin/sh -c 'sleep 1; exec /usr/bin/Starter `hostname`'

Is there a significant advantage to using the systemd macro over the 
backtick operator applied to the hostname program? Is the overhead of a 
spawned process really that expensive in this usage?

If you're scrabbling for CPU cycles, you might be better off writing 
everything in C and using low-level kernel APIs. But I suspect that's 
not the case here.




More information about the systemd-devel mailing list