On Tue, Mar 18, 2014 at 04:44:22PM +0100, Bartosz Gołaszewski wrote:
> > I have such a directory on my systems (/mnt/tmpfs, 0755, with /tmp
> > actually being a symlink to /mnt/tmpfs/tmp, 1777). Some distributions
> > use an initramfs and create /lib/rw (ugh). Unfortunately, nothing is
> > standardized... Maybe we could use /dev ? Ha ha, only serious.
> 
> Is it necessary to use a filesystem at all? Why not use a
> pthread_mutex shared across processes of the user calling su and
> perform a pthread_mutex_timedlock() before the delay?

That's a lot more complex and expensive and requires the availability
of shared memory for the mutex to reside in. If you want to share a
locking resource between unrelated processes, you can't get around
having have have some global namespace for it to be shared through,
whether that's explicitly the filesystem (as in my /var approach) or
implicitly the filesystem (via /dev/shm) or the sysvipc namespace.

Rich
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to