lkml.org 
[lkml]   [1998]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: The /tmp and modules_install saga
    Date
    "A month of sundays ago Ken Pizzini wrote:"
    >
    > >Bet that's gnu and not posix. If it is posix, I'll pinch it.
    >
    > It's POSIX.
    >
    > Quoting from IEEE Std 1003.2-1992 (AKA POSIX.2):
    > 4.41.3 Options
    > [snip]
    > -p Create any missing intermediate pathname components.

    Thanks. Pinched. A whole multiplatform VPATH-based makefile now depends
    on you.

    Incidently this whole thing arose out of alan's statement that mktemp
    was required if you're going to use /tmp. He got offered several ways
    to avoid using files at all - don't know if he changed anything - but
    I had occasion to set up a script that uses tmp files a couple of days
    ago, so I tried to setup a mktemp replacement as mental exercise. I don't
    think you need to. Just do:

    1) grab two bytes from /dev/random and mkdir (umask!) using them
    in /tmp (in case no /dev/random, use something else)
    2) cd to the new directory and pwd to see where you are
    3) if you are not where you should be, back out and go to 1).

    I don't see any races there. But then there are lots of things I don't
    see.

    Peter

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:0.024 / U:30.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site