If xflock4 and other alternatives fail (i.e. return non-zero exit code), user should be notified and error handled.
Se also https://bugzilla.xfce.org/show_bug.cgi?id=10089
So use g_spawn_command_line_sync () instead of g_spawn_command_line_async () http://www.gtk.org/api/2.6/glib/glib-Spawning-Processes.html#g_spawn_command_line_sync ?
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/5. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev