Skip to content
  • Craig Small's avatar
    killall,pstree use clock_gettime not uptime · a146bfc3
    Craig Small authored
    
    
    /proc/uptime can become a container uptime in LXC containers
    but the process start time is still relative to the boot time.
    
    This means things like "newer than" or "older than" will be incorrect
    in some containers, using clock_gettime() fixes this as its always the
    hosts boot time.
    
    References:
     https://bugs.debian.org/1066090
     https://gitlab.com/procps-ng/procps/-/commit/b5e19c1730bcc68d553f44b5585704e3c92267bf#83c45d853acc8384452b404946e4a0c484b16a4e
    
    Signed-off-by: Craig Small's avatarCraig Small <csmall@dropbear.xyz>
    a146bfc3
To find the state of this project's repository at the time of any of these versions, check out the tags.