Best way to use dhcpc / avahi without delaying other init scripts ?
Avery Pennarun
apenwarr at gmail.com
Tue Apr 30 23:17:23 UTC 2013
On Tue, Apr 30, 2013 at 2:52 PM, Harald Becker <ralda at gmx.de> wrote:
> Avery wrote:
>>Maybe you just want to background the whole chunk of logic using an sh
>>block?
>>
>>(
>> dhcpc -b ...
>> ...if it failed to get an address from dhcp, do something else...
>>) &
>
> You are right, but using braces instead of parenthesis may avoid an
> extra fork (saves some time/resources).
>
> {
> ... your logic goes here
> } &
The & sign implies the need for a fork anyway. As far as I know, all
modern shells are smart enough to avoid double-forking in this case.
:)
Have fun,
Avery
More information about the busybox
mailing list