A crop of new capabilities
A crop of new capabilities
Posted Jun 11, 2020 20:41 UTC (Thu) by Jandar (subscriber, #85683)In reply to: A crop of new capabilities by mathstuf
Parent article: A crop of new capabilities
The uptime doesn't factor in. The production systems of our customers mostly have max-pid of 64k with a high uptime. The pid wraps around after a few hours to a few days. So if someone other starts a screen from the shared admin-account it gets a pid nearly at random. The pids starting from 1 to 5 are from a set of 11111 numbers (disregarding special pids like 1) and pids starting from 7 to 9 are from a set of 1111.
while [[ $(readlink /proc/self) != 9* ]]; do :; done && screen -S Jandar
As normally at most a handful screen are running, the chance to have 9* exclusively for myself is high because no workmate uses the shell-prompt to type in loops. Probability with 5 other screen = (1-1111/2^16)^5 = .91807.