Is threre a way to find out PROCD is waiting to acquire lock

Hi everyone,

First thanks for all your effort to make OpenWRT happen!

I'm using vpn-policy-routing package. Sometimes it happens that /etc/init.d/vpn-policy-routing reload run couple of times regarding to issues in connections. Each of this runs wait for previous run to end and then start to work. And I want the last run to kill previous ones.

I Investigated this issue and found that there is procd_lock function that is called to acquire a shared lock and then call other functions that call start_service function.

What I want to do is to know that if PROCD is waiting for lock and then kill the previous processes. I couldn't find anything about it. I saw that there is service_running function but it is useless because after first successful run of the script, it is always True

Please kindly answer if it is possible to do such thing and help me to find/develop it.

Thanks in advance