Help with wpa_cli not executing a "kill -usr1" action

David Linares dlinares.linux at
Fri May 3 10:25:41 EDT 2013

Hi Krishna,

I am not killing the process, just sending a signal (SIGUSR1).
The solution you mentioned works fine though but I guess it does
pretty much the same than what I recently tried:
- sending a SIGUSR2 to release the current lease
- sending a SIGUSR1 to get a new one


On 1 May 2013 16:27, Krishna Chaitanya <chaitanya.mgit at> wrote:
> On Wed, May 1, 2013 at 5:50 PM, Arend van Spriel <arend at> wrote:
>> On 05/01/2013 10:50 AM, David Linares wrote:
>>> On 30 April 2013 20:54, Jouni Malinen <j at> wrote:
>>>> On Tue, Apr 30, 2013 at 06:24:49PM +0100, David Linares wrote:
>>>>> And here is the content of my /tmp/ script that I
>>>>> pass to wpa_cli:
>>>>>          echo "CONNECTED"
>>>>>          PIDOF_UDHCPC=`pidof udhcpc`
>>>>>          if [[ "$PIDOF_UDHCPC" != "" ]]; then
>>>>>                  echo "Sending SIGUSR1 to process $PIDOF_UDHCPC"
>>>>>                  kill -usr1 $PIDOF_UDHCPC
>>>>>          fi
>>>>>  From the wpa_cli, I am getting the echos (CONNECTED and Sending...)
>>>>> but it doesn't seem that my signal is sent to udhcpc as my IP address
>>>>> is not renewed when looking at ifconfig.
>>>>> By doing a  kill -usr1 `pidof udhcpc`  directly from the command line,
>>>>> straight away, a new IP is requested and updated a few seconds later.
>>>>> Then, does anybody know if there is a limitation from the wpa_cli
>>>>> command-line tool not being able to execute a kill command? I will try
>>>>> the last version (2.0) tomorrow.
>>>> wpa_cli does not prevent that. Are you running this process under a
>>>> user account that has privileges to execute that kill command on udhcpc?
>>>> Have you verified that running that script of your
>>>> manually from the command line works?
>>> Thanks a lot Jouni.
>>> Today I have done more tests by launching the script manually from
>>> command line after I get connected to my 2nd connection.
>>> I noticed that I need to execute it twice to have an effect.
>>> Same thing by just using "kill -usr1 <pid>" from command line, I need
>>> to send the SIGUSR1 twice to udhcpc in order get a new IP address.
>> Do you mean a) new and different IP address or b) a new lease for an IP address that may or may not be the same.
> I dont see the need for killing the process, a simple renew would suffice.
> udhcpc -R -q
> udhcpc -q

More information about the HostAP mailing list