[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /run vs /var/run



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

md@Linux.IT (Marco d'Itri) writes:

> On Dec 19, Roger Leigh <rleigh@whinlatter.ukfsn.org> wrote:
>
>> With this example, it's trivial to trigger namespace conflicts and
>> break shm_open().  "mkdir /dev/shm/foobar", for example, or create a
>> symbolic link.  These fail outright.  If a regular file was opened, it
> And so would two programs using the same name for a SHM object (well,
> they would share it, as it's designed to be).

Yes.  You would however be cooperating, and using O_CREAT|O_EXCL and
unlinking at the appropriate times so as to avoid any trouble.

> The real lesson in this is that object names should be choosed
> carefully.

That's correct, but you should still not be using the namespace for
non-SHM activities.


- -- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iD8DBQFDpxmCVcFcaSW/uEgRAgU5AJ0TnZc1ljigaWcDg4tOBnc19aVliQCfeGZw
qhipCtZj2sARpU8FyketWo8=
=wzMr
-----END PGP SIGNATURE-----



Reply to: