I have configured the wlan0 interface to work with wpa_supplicant and udhcpc. In case of wrong wireless key, the dhcp client terminate so when I try to force the shutdown of the interface, the command ifdown exit with status 1. And then the daemon wpa_supplicant still active because the scripts inside if-post-down.d aren't executed. To solve the problem in file ifupdown.c I have modified the command line for stopping the dhcp client. In this case if the pid file is not present the kill command is not executed and the return value is correct. The modification is for both external dhcpc and udhcpc test ! -f /var/run/udhcpc.%iface%.pid || kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null