Since 'procps_uptime' will access the /proc filesystem
the <pids> 'new' guy should should protect against the
possibility /proc isn't mounted when 'boot_seconds' is
established. A zero is better than the negative value.
[ the only distortion would be to PIDS_TIME_ELAPSED. ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
pgsz = getpagesize();
while (pgsz > 1024) { pgsz >>= 1; p->pgs2k_shift++; }
-
p->hertz = procps_hertz_get();
- procps_uptime(&uptime_secs, NULL);
- p->boot_seconds = uptime_secs;
+
+ // in case 'fatal_proc_unmounted' wasn't called and /proc isn't mounted
+ if (0 >= procps_uptime(&uptime_secs, NULL))
+ p->boot_seconds = uptime_secs;
numa_init();