processes: use long for pids on linux and solaris
authorMarc Fournier <marc.fournier@camptocamp.com>
Tue, 16 Feb 2016 09:28:04 +0000 (10:28 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 16 Feb 2016 09:50:28 +0000 (10:50 +0100)
commit784da33b8166649c42c4457b04dd0c82554971c8
treef0c4ccd2b4f4601e3ffeee7b7943b0307dd6b7f0
parent00f9279d9711c9882b65d54fd72c2f25a3f403fc
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.
src/processes.c