Skip to contentSkip to conversation

systemd startup notification for iwd?

DISCUSSION Bruce Johnson 2 participants 2 messages Dec 10, 2020

lore
Share & tools
lore
#0 lore raw

I'm trying to figure out how to resolve what appears to be a race condition between iwd and my application that uses it through the API. Despite my attempts so far to tell systemd to start iwd before my application, the best I've gotten thus far is "Starting..." messages with the same timestamp for the two services. Has there been any consideration of adding a call to systemd's sd_notify function when iwd is ready to accept requests?

#1 lore raw

Hi Bruce,

Quoted 1 line · Bruce Johnson

I'm trying to figure out how to resolve what appears to be a race condition between iwd and my application that uses it through the API. Despite my attempts so far to tell systemd to start iwd before my application, the best I've gotten thus far is "Starting..." messages with the same timestamp for the two services. Has there been any consideration of adding a call to systemd's sd_notify function when iwd is ready to accept requests?

I'm not sure why systemd is involved in this actually? There really isn't a single point in time where iwd is 'ready'. It depends on the hardware being detected, initialized, etc. So each interface / object would be signaled independently anyway. I would suggest that your application should be listening to D-Bus signals and figuring out what interfaces are becoming available (via InterfacesAdded signal, etc).

Regards,
-Denis