main: don't limit upper bound of pid when checking pidfile

This commit removes the upper bound check for the PID, letting NetworkManager recognize a PID from the pidfile higher than 2^16.
The PID limit is often set higher than 2^16 (65536) on 64-bit systems, resulting in the pidfile being ignored and subsequently deleted if the currently running instance of NetworkManager has a pid higher than 2^16.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1727
This commit is contained in:
Jan Vaclav 2023-09-11 11:42:47 +02:00 committed by Beniamino Galvani
parent ffc377ecc6
commit 28f7a6638f

View file

@ -174,7 +174,7 @@ nm_main_utils_ensure_not_running_pidfile(const char *pidfile)
errno = 0;
pid = strtol(contents, NULL, 10);
if (pid <= 0 || pid > 65536 || errno)
if (pid <= 0 || errno)
return;
nm_clear_g_free(&contents);