in reply to singleton lock not reliable

Of course you can see two instances in ps output. One instance holds the lock and sleeps, the other one has just started and hasn't yet tried to obtain the lock.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: singleton lock not reliable
by ikegami (Pope) on Jun 24, 2021 at 04:28 UTC

    In other words, the lock doesn't prevent multiple instances of the script from running. It just prevents all but one of them from reaching the sleep.

    Seeking work! You can reach me at