RVP wrote in
<alpine.NEB.2.22.394.2104261944390.18736%otaku.sdf.org@localhost>:
|
|Use POSIX shm_open+sem_open? That should let you do proper reference
|counting w/o a server. You'll have to pull in -lrt on Linux & NetBSD
|for this though...
Well, that module had (file-locked file-based) reference counting.
It will not work with programs backgrounding away, like tmux.
Unless you PAMify them all. Even then.
Any shell script can background away.
You thus need a global authority collecting all per-user programs
that execve(2) away from a (child of a) program who enabled
a session, which was what i (who never looked into this, being