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> | |
Tue, 16 Feb 2016 09:50:28 +0000 (10:50 +0100) | ||
commit | 784da33b8166649c42c4457b04dd0c82554971c8 | |
tree | f0c4ccd2b4f4601e3ffeee7b7943b0307dd6b7f0 | tree | snapshot |
parent | 00f9279d9711c9882b65d54fd72c2f25a3f403fc | 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 |