author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 16 Feb 2016 09:28:04 +0000 (10:28 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 27 Feb 2016 22:55:53 +0000 (23:55 +0100) | ||
commit | 7c495a522fb2c3b335a3f6252c26432813542e79 | |
tree | 53028141144c0ccefa5c1497d3cb5b259e4a4f84 | tree | snapshot |
parent | 6bf6dbc2346b4e3cae96aedb1697392a1ad5efe1 | commit | diff |
processes: use long for pids on linux and solaris
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
src/processes.c | diff | blob | history |