Multiple udhcpc processes

In the OpenWRT system, whenever an interface is up and configured in DHCP mode to allocate an IP address, a udhcpc process is triggered to be responsible for the IP address lease application and management of that interface. for axample

udhcpc -p /var/run/udhcpc-eth1.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth1 -x hostname:OpenWrt -C -R -O 12

This results in the need for multiple udhcpc processes in the case of multiple interfaces.

Is there a way to modify it so that only one DHCP process is responsible for IP address allocation for all interfaces?

I don't believe so. What's the particular issue with how it operates at the moment?

udhcp (busybox) is different from dhcpcd , it is available as a package, but not integrated with netifd scripts.

i mean, for example,in ubuntu, systemd-networkd (which is similar to netifd) contains its own in-built DHCP client implementation so no external DHCP clients would be started unless they're configured elsewhere.

maybe it works more efficiently

If you want it you can instrument udhcpcd in netifd scripts, otherwise it works as you documented - new daemon for 2nd interface in the rather unbelievable case of 2 dhcp client interfaces.

OpenWRT isn't ubuntu. And, in any event, something being done differently by a different OS doesn't indicate any problem or issue with OpenWRT.

Is there an actual issue you have or have seen from the use of multiple instances of udhcpc?

well, in the case of multiple interfaces, the system needs to start multiple instances of the same executable program. I am worried about the waste of system resources and overload. For example, when I create 4000 vlan interfaces, 4000 udhcpc processes may be required to run at the same time

Have you created or started 4000 vlan interfaces? Have you had any issues with system resources or overloads because of udhcpc?

But you are welcome to integrate dhcpcd with netifd scripts.