blocking calls in upowerd

Matthias Clasen matthias.clasen at gmail.com
Wed Aug 18 13:43:16 PDT 2010


We've finally tracked down my polkit<>upower problems to a race
condition between polkit and CK, but before leaving the upower code
base, I thought I should point out that calls like

result = polkit_authority_check_authorization_sync
(polkit->priv->authority, subject, action_id, NULL,
POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, NULL,
&error_local);

are a _really_ bad idea in a system daemon. This will block all your
other clients while the user twiddles his thumbs in front of a auth
dialog, potentially.

Maybe porting to gdbus will be a good occasion to get rid of all sync,
blocking calls.


Matthias


More information about the devkit-devel mailing list