seen this on OpenBSD while running in foreground: [error_watch] gs-window-x11.c:892 (09:16:55.935): Command output: sh: pidof: not found coming from https://git.xfce.org/apps/xfce4-screensaver/tree/src/gs-lock-plug.c#n174 pgrep does the same as pidof, and is present everywhere, while iirc pidof is linux only. [23/03 09:52] landry@ansible.dmz:~/infra $pidof ssh-agent 27409 24228 23463 23415 22800 21497 19770 19760 19755 19628 19609 19273 17903 15395 7843 7833 2425 356 [23/03 09:53] landry@ansible.dmz:~/infra $pgrep ssh-agent 356 2425 7833 7843 15395 17903 19273 19609 19628 19755 19760 19770 21497 22800 23415 23463 24228 27409 and given that we merely try to detect if mdm, gdm, gdm3 or gdm-binary are running, we could avoid the uuuugly |wc -l and just check the return code of pgrep: (on linux) EXIT STATUS 0 One or more processes matched the criteria. For pkill the process must also have been successfully signalled. 1 No processes matched or none of them could be signalled. 2 Syntax error in the command line. 3 Fatal error: out of memory etc. (on openbsd) EXIT STATUS The pgrep and pkill utilities exit with one of the following values: 0 One or more processes were matched. 1 No processes were matched. 2 Invalid options were specified on the command line. 3 An internal error occurred.
see https://mywiki.wooledge.org/BadUtils#pidof for a reasoning - even if pgrep is not standardized in options (nor in POSIX), at least it's present everywhere.
-- 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/apps/xfce4-screensaver/-/issues/38. 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