Skip to content

Fix gparted not launching when PS_FORMAT environment variable set

nicoo requested to merge nbraud/gparted:pgrep into master

Unlike ps(1), pgrep(1) is not affected by environment variables such as PS_FORMAT, so it is safe to use without assuming PS_FORMAT is similar-enough to the default.

This is the root cause of Debian bug #864932, that caused a user who had PS_FORMAT set to be unable to start gparted, short of calling gpartedbin directly, as ps -e | grep gpartedbin matched the grep process.

Moreover, this is more efficient and less error-prone.

Edited by Mike Fleetwood

Merge request reports