tempnam

TEMPNAM(3)                 Linux Programmer's Manual                TEMPNAM(3)



åå
       tempnam - ãã³ãã©ãªãã¡ã¤ã«ã®ååãä½æãã

æ¸å¼
       #include <stdio.h>

       char *tempnam(const char *dir, const char *pfx);

説æ
       é¢æ° tempnam() ã¯å¼æ° pfx ãNULLã§ãªãå ´åã«ãããã§æå®ããã ï¼æå‐
       ã¾ã§ã使ã£ã¦ä»ã¨éãªããªããããªãã³ãã©ãªãã¡ã¤ã«åãä½æããã
       ãã³ãã©ãªãã¡ã¤ã«ãç½®ããããã£ã¬ã¯ããªã¯ã次ã®é çªã«æ¢ããã:-


              a)     æ¸ãè¾¼ã¿ãå¯è½ãªããç°å¢å¤æ° TMPDIR ã§æå®ããããã£ã¬ã¯ããªã

              b)     NULLã§ãªãå¼æ° dir ã§æå®ããããã£ã¬ã¯ããªã

              c)
                      P_tmpdir ã§æå®(訳注:/usr/include/stdio.h ä¸‐
                     ã§å®ç¾©)ããããã£ã¬ã¯ããªã

              d)
                      /tmp ãã£ã¬ã¯ããªã

       ä½æãããã¡ã¤ã«åã®è¨æ¶é å㯠malloc() ã使ã確ä¿ãã㦠ããã®ã§ãé¢æ° free()
       ã«ãããã®è¨æ¶é åãéæ¾ããäºãã§ããã

è¿ãå¤
       é¢æ° tempnam() ã¯ä»ã¨éãªããªããã³ãã©ãªãã¡ã¤ã«åã¸ã®
       ãã¤ã³ã¿ã¼ãè¿ãããä»ã¨éãªããªããã¡ã¤ã«åãä½æã§ããªãã£ã å ´åã«ã¯NULLãè¿ãã

ã¨ã©ã¼
       EEXIST ä»ã¨éãªããªããã¡ã¤ã«åãä½æã§ããªãã£ãã

æºæ
       SVID 3, BSD 4.3

é¢é£é ç®
       mktemp(3), mkstemp(3), tmpnam(3), tmpfile(3)




GNU                              April 3, 1993                      TEMPNAM(3)