Date: Monday March 04, 2019 @ 02:20 Author: argrath Update of /cvsroot/perldocjp/docs/modules/File-Temp-0.12 In directory sf-cvs:/tmp/cvs-serv62129/modules/File-Temp-0.12 Modified Files: Temp.pod Log Message: refine wording =================================================================== File: Temp.pod Status: Up-to-date Working revision: 1.6 Sun Mar 3 17:20:47 2019 Repository revision: 1.6 /cvsroot/perldocjp/docs/modules/File-Temp-0.12/Temp.pod,v Existing Tags: No Tags Exist -------------- next part -------------- Index: docs/modules/File-Temp-0.12/Temp.pod diff -u docs/modules/File-Temp-0.12/Temp.pod:1.5 docs/modules/File-Temp-0.12/Temp.pod:1.6 --- docs/modules/File-Temp-0.12/Temp.pod:1.5 Sun Mar 3 20:40:36 2019 +++ docs/modules/File-Temp-0.12/Temp.pod Mon Mar 4 02:20:47 2019 @@ -3,6 +3,12 @@ =head1 NAME +=begin original + +File::Temp - return name and handle of a temporary file safely + +=end original + File::Temp - ¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î̾Á°¤È¥Ï¥ó¥É¥ë¤ò°ÂÁ´¤ËÊÖ¤¹ =begin __INTERNALS @@ -68,8 +74,14 @@ $fh = tempfile(); +=begin original + MkTemp family: +=end original + +MkTemp ·Ï: + use File::Temp qw/ :mktemp /; ($fh, $file) = mkstemp( "tmpfileXXXXX" ); @@ -79,8 +91,14 @@ $unopened_file = mktemp( $template ); +=begin original + POSIX functions: +=end original + +POSIX ´Ø¿ô: + use File::Temp qw/ :POSIX /; $file = tmpnam(); @@ -89,9 +107,14 @@ ($fh, $file) = tmpnam(); ($fh, $file) = tmpfile(); +=begin original Compatibility functions: +=end original + +¸ß´¹´Ø¿ô: + $unopened_file = File::Temp::tempnam( $dir, $pfx ); =begin later @@ -116,12 +139,10 @@ =end original -C<File::Temp> ¤Ï¡¢°ÂÁ´¤ÊÊýË¡¤Ç¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢¥ª¡¼¥×¥ó¤¹¤ë¤Î¤Ë¡¢ -»È¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡£ -tempfile() ´Ø¿ô¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î̾Á°¤È¡¢ -³«¤¤¤¿¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤·¤Þ¤¹¡£ -tempdir() ´Ø¿ô¤Ï¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤¹¤ë¤Î¤Ë¡¢»È¤ï¤ì¤Þ¤¹¡£ +C<File::Temp> ¤Ï¡¢°ÂÁ´¤ÊÊýË¡¤Ç¡¢°ì»þ¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢³«¤¯¤Î¤Ë»È¤¨¤Þ¤¹¡£ +tempfile() ´Ø¿ô¤Ï¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Î̾Á°¤È¡¢³«¤¤¤¿¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤¹¤Î¤Ë +»È¤ï¤ì¤Þ¤¹¡£ +tempdir() ´Ø¿ô¤Ï¡¢°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤¹¤ë¤Î¤Ë»È¤ï¤ì¤Þ¤¹¡£ =begin original @@ -137,13 +158,13 @@ °ì»þ¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤³¤È¤Î¥»¥¥å¥ê¥Æ¥£¤Î¦Ì̤¬¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È ¥Õ¥¡¥¤¥ë̾¤¬°ì½ï¤ËÊÖ¤µ¤ì¤ë¤È¤¤¤¦¤³¤È¤Ç¡¢¶¯Ä´¤µ¤ì¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¤«¤ò¥Á¥§¥Ã¥¯¤·¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë´Ö¤Ë¡¢ -ÊÌ¤Î¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬ºî¤é¤ì¤ë¤È¤¤¤¦ -¶¥¹ç¾ò·ï¤¬µ¯¤³¤é¤Ê¤¤¤³¤È¤òÊݾڤ·¤Æ¤¤¤Þ¤¹¡£ -ÄɲäΥ»¥¥å¥ê¥Æ¥£¥ì¥Ù¥ë¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ -¤¿¤È¤¨¤Ð¡¢¥¹¥Æ¥£¥Ã¥¡¼¥Ó¥Ã¥È¤¬À¤³¦¤¬½ñ¤¹þ¤ß²Äǽ¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë +¤³¤ì¤¬¡¢¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¤«¤ò¥Á¥§¥Ã¥¯¤·¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë´Ö¤Ë +ÊÌ¤Î¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬ºî¤é¤ì¤ë¡¢¤È¤¤¤¦ +¶¥¹ç¾ò·ï¤¬µ¯¤³¤é¤Ê¤¤¤³¤È¤òÊݾڤ¹¤ë¤Î¤ò½õ¤±¤Æ¤¤¤Þ¤¹¡£ +ÄɲäΥ»¥¥å¥ê¥Æ¥£¥ì¥Ù¥ë¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹; +Î㤨¤Ð¡¢¥¹¥Æ¥£¥Ã¥¡¼¥Ó¥Ã¥È¤¬Á´Âνñ¤¹þ¤ß²Äǽ¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë ¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤«¤Î¥Á¥§¥Ã¥¯¤Ç¤¹¡£ -¾ÜºÙ¤Ï¡¢L<"safe_level"> ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ +¾ÜºÙ¤Ï L<"safe_level"> ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ =begin original @@ -154,7 +175,7 @@ =end original °ìÈÌŪ¤Ê C ¥é¥¤¥Ö¥é¥ê´Ø¿ô¤È¤Î¸ß´¹À¤Î¤¿¤á¤Ë¡¢ -mkstemp() ´Ø¿ô¤ÎÃç´Ö¤¬¡¢Perl ¤Î¼ÂÁõ¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +mkstemp() ´Ø¿ô¤ÎÃç´Ö¤Î Perl ¼ÂÁõ¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ mkstemp(), mkstemps(), mkdtemp(), mktemp() ¤¬¤¢¤ê¤Þ¤¹¡£ =begin original @@ -164,8 +185,8 @@ =end original -¤¯¤ï¤¨¤Æ¡¢É¸½à¤Î L<POSIX|POSIX> ¤Î¼ÂÁõ¤Ç¤¢¤ë¡¢tmpnam() ¤È¡¢tmpfile() ¤¬¡¢ -ɬÍפʤ顢Ä󶡤µ¤ì¤Þ¤¹¡£ +¤µ¤é¤Ë¡¢¤â¤·É¬Íפʤ顢ɸ½à¤Î L<POSIX|POSIX> ¤Î¼ÂÁõ¤Ç¤¢¤ë tmpnam() ¤È +tmpfile() ¤¬Ä󶡤µ¤ì¤Þ¤¹¡£ =begin original @@ -176,12 +197,11 @@ =end original -mktemp(), tmpanam(), tempnam() ¤Î¼ÂÁõ¤ÏÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ -¤Ç¤¹¤¬¡¢ÍÑ¿´¤·¤Æ»È¤ï¤ì¤ë¤Ù¤¤Ç¤¹¡£ -¤È¤¤¤¦¤Î¤Ï¡¢¤³¤ì¤é¤Ï¡¢ -´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¤È¡¢ÂÅÅö¤Ê¥Õ¥¡¥¤¥ë̾¤À¤±¤òÊÖ¤·¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¤¬¡¢¸Æ¤Ó½Ð¤·¤¿¿Í¤¬¥Õ¥¡¥¤¥ë¤ò³«¤¯»þ¤Ë¸ºß¤·¤Æ¤¤¤Ê¤¤¤³¤È¤ò -ÊݾڤǤ¤Þ¤»¤ó¡£ +mktemp(), tmpanam(), tempnam() ¤Î¼ÂÁõ¤ÏÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢ +Ãí°Õ¤·¤Æ»È¤ï¤ì¤ë¤Ù¤¤Ç¤¹; +¤Ê¤¼¤Ê¤é¡¢´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¤È¡¢ÂÅÅö¤Ê¥Õ¥¡¥¤¥ë̾¤À¤±¤òÊÖ¤¹¤Î¤Ç¡¢ +¸Æ¤Ó½Ð¤·Â¦¤¬¥Õ¥¡¥¤¥ë¤ò³«¤¯»þ¤Ë¤½¤Î¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¤³¤È¤ò +ÊݾڤǤ¤Ê¤¤¤«¤é¤Ç¤¹¡£ =head1 FUNCTIONS @@ -194,8 +214,7 @@ =end original -¤³¤Î¥»¥¯¥·¥ç¥ó¤Ç¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤È¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤ò -À¸À®¤¹¤ë¤¿¤á¤Î¡¢ +¤³¤ÎÀá¤Ç¤Ï¡¢°ì»þ¥Õ¥¡¥¤¥ë¤È°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òÀ¸À®¤¹¤ë¤¿¤á¤Î¡¢ ¿ä¾©¤µ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹¡£ =over 4 @@ -209,8 +228,8 @@ =end original -¤³¤ì¤Ï¡¢´ðËÜŪ¤Ê´Ø¿ô¤Ç¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¤Î¿¶Éñ¤ÏÍÍ¡¹¤Ê¥ª¥×¥·¥ç¥ó¤Ç¡¢Êѹ¹¤Ç¤¤Þ¤¹: +¤³¤ì¤Ï´ðËÜŪ¤Ê´Ø¿ô¤Ç¡¢°ì»þ¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ +¥Õ¥¡¥¤¥ë¤Î¿¶¤ëÉñ¤¤¤ÏÍÍ¡¹¤Ê¥ª¥×¥·¥ç¥ó¤ÇÊѹ¹¤Ç¤¤Þ¤¹: ($fh, $filename) = tempfile(); @@ -221,8 +240,8 @@ =end original -L<File::Spec> ¤Î tmpdir() ´Ø¿ô¤ÇÆÃÄꤵ¤ì¤ë¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ëÍѤΥǥ£¥ì¥¯¥È¥ê¤Ë¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ +L<File::Spec> ¤Î tmpdir() ´Ø¿ô¤Ç»ØÄꤵ¤ì¤ë +°ì»þ¥Õ¥¡¥¤¥ëÍѤΥǥ£¥ì¥¯¥È¥ê¤Ë¡¢°ì»þ¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ ($fh, $filename) = tempfile($template); @@ -236,10 +255,10 @@ =end original ¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¡¢Ä󶡤µ¤ì¤¿¥Æ¥ó¥×¥ì¡¼¥È¤ò»È¤Ã¤Æ¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤¿¤á¤Ë¡¢ -Ê£¿ô¤Î `X' ʸ»ú¤Î¸å¤òÄɤ¦¤â¤Î¤¬¥é¥ó¥À¥à¤Êʸ»ú¤Ë¡¢ÃÖ¤´¹¤¨¤é¤ì¤Þ¤¹¡£ -¾¯¤Ê¤¯¤È¤â¡¢»Í¤Ä¤Î `X' ʸ»ú¤¬¥Æ¥ó¥×¥ì¡¼¥È¤ËÍ¿¤¨¤é¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +°ì»þ¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ +¥Õ¥¡¥¤¥ë̾¤òÀ¸À®¤¹¤ë¤È¤¤Ë¡¢ +ËöÈø¤Îʸ»ú `X' ¤Ï¥é¥ó¥À¥à¤Êʸ»ú¤ËÃÖ¤´¹¤¨¤é¤ì¤Þ¤¹¡£ +¾¯¤Ê¤¯¤È¤â»Í¤Ä¤Î `X' ʸ»ú¤¬¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ ($fh, $filename) = tempfile($template, SUFFIX => $suffix) @@ -252,10 +271,10 @@ =end original -`X' ¤ÎÊÑ´¹¤Î¸å¤Ë¡¢ÀÜÈø»þ¤¬²Ã¤¨¤é¤ì¤ë¤³¤È¤ò½ü¤¤¤Æ¡¢Á°¤Î¤â¤Î¤È¡¢Æ±¤¸¤Ç¤¹¡£ +`X' ¤ÎÊÑ´¹¤Î¸å¤ËÀÜÈø¼¤¬²Ã¤¨¤é¤ì¤ë¤³¤È¤ò½ü¤¤¤Æ¡¢Á°¤Î¤â¤Î¤ÈƱ¤¸¤Ç¤¹¡£ ¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÇɬÍפȤµ¤ì¤ë¤È¤¤Ë¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤ËÆÃÊ̤γÈÄ¥»Ò¤¬¤¢¤ë¤è¤¦¤Ë¤·¤¿¤¤¤Ê¤é¡¢ÊØÍø¤Ç¤¹¡£ -¤Ç¤¹¤¬¡¢ºÇ¸å¤Î¡¢·Ù¹ð¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ +¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤ËÆÃÊ̤γÈÄ¥»Ò¤¬¤¢¤ë¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤ËÊØÍø¤Ç¤¹¡£ +¤·¤«¤·¡¢ºÇ¸å¤Î·Ù¹ð¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ ($fh, $filename) = tempfile($template, DIR => $dir); @@ -267,7 +286,7 @@ =end original ¥Ç¥£¥ì¥¯¥È¥ê¤Î̾Á°¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤Î¤ò½ü¤¤¤Æ¡¢ -Á°¤Î¤è¤¦¤Ë¥Æ¥ó¥×¥ì¡¼¥È¤òÊÑ´¹¤·¤Þ¤¹¡£ +Á°½Ò¤Î¤â¤Î¤ÈƱÍͤ˥ƥó¥×¥ì¡¼¥È¤òÊÑ´¹¤·¤Þ¤¹¡£ ($fh, $filename) = tempfile($template, UNLINK => 1); @@ -281,11 +300,11 @@ =end original -°ÊÁ°¤Î¤è¤¦¤Ë¡¢¥Õ¥¡¥¤¥ë̾¤È¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤·¤Þ¤¹¤¬¡¢ -¥×¥í¥°¥é¥à¤¬exit¤·¤¿¤È¤¤Ë¡¢¼«Æ°Åª¤Ë¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬ºï½ü¤µ¤ì¤Þ¤¹¡£ +Á°½Ò¤Î¤è¤¦¤Ë¥Õ¥¡¥¤¥ë̾¤È¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤·¤Þ¤¹¤¬¡¢ +¥×¥í¥°¥é¥à¤¬½ªÎ»¤·¤¿¤È¤¤Ë¼«Æ°Åª¤Ë°ì»þ¥Õ¥¡¥¤¥ë¤¬ºï½ü¤µ¤ì¤Þ¤¹¡£ ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤Ï¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬Í׵ᤵ¤ì¤ì¤Ðºï½ü¤µ¤ì¡¢ ¥Õ¥¡¥¤¥ë̾¤¬Í׵ᤵ¤ì¤ì¤ÐÊÝ»ý¤µ¤ì¤Þ¤¹¡£ -(¥Õ¥¡¥¤¥ë̾¤¬ÊÖ¤µ¤ì¤Ê¤¤)¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¤Ï¡¢exit ¤«¡¢¥¯¥í¡¼¥º¤µ¤ì¤ì¤Ð¡¢ +(¥Õ¥¡¥¤¥ë̾¤¬ÊÖ¤µ¤ì¤Ê¤¤)¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¤Ï¡¢½ªÎ»»þ¤«¡¢ÊĤ¸¤é¤ì¤¿¤È¤¤Ë¡¢ ¥Õ¥¡¥¤¥ë¤Ï¤¤¤Ä¤âºï½ü¤µ¤ì¤Þ¤¹¡£ =begin original @@ -297,10 +316,8 @@ =end original -¥Æ¥ó¥×¥ì¡¼¥È»ØÄꤷ¤Ê¤±¤ì¤Ð¡¢¥Æ¥ó¥×¥ì¡¼¥È¤Ï¤¤¤Ä¤â¡¢ -¼«Æ°Åª¤ËÀ¸À®¤µ¤ì¤Þ¤¹¡£ -¤³¤Î¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Ï¡¢ -DIR ¥ª¥×¥·¥ç¥ó¤Ç¡¢ÌÀ¼¨Åª¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤¬»ØÄꤵ¤ì¤Ê¤±¤ì¤Ð¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¤¬»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¡¢¥Æ¥ó¥×¥ì¡¼¥È¤Ï¾ï¤Ë¼«Æ°Åª¤ËÀ¸À®¤µ¤ì¤Þ¤¹¡£ +¤³¤Î°ì»þ¥Õ¥¡¥¤¥ë¤Ï¡¢DIR ¥ª¥×¥·¥ç¥ó¤ÇÌÀ¼¨Åª¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤¬»ØÄꤵ¤ì¤Ê¤¤¸Â¤ê¡¢ tmpdir()(L<File::Spec>) ¤ËÃÖ¤«¤ì¤Þ¤¹¡£ $fh = tempfile( $template, DIR => $dir ); @@ -320,15 +337,15 @@ =end original -¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ë¤È¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬ÊÖ¤µ¤ì¡¢ -¥¯¥í¡¼¥º¤µ¤ì¤ë¤È(¤³¤Î¥É¥¥å¥á¥ó¥È¤Î¾¤Î¾ì½ê¤Ç¡¢tmpfile() ¤ò¸«¤Æ¤¯¤À¤µ¤¤)¡¢ +¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬ÊÖ¤µ¤ì¡¢ +ÊĤ¸¤é¤ì¤ë¤È(¤³¤Îʸ½ñ¤Î¾¤Î¾ì½ê¤Ë¤¢¤ë tmpfile() ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤)¡¢ ¥Õ¥¡¥¤¥ë¤Ï¼«Æ°Åª¤Ëºï½ü¤µ¤ì¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤À¤±¤ò»ý¤Ä¤Î¤Ê¤é¡¢¤³¤ì¤Ï¹¥¤Þ¤ì¤ë¤ä¤êÊý¤Ç¤¹¡£ -¥Õ¥¡¥¤¥ë¥Í¡¼¥à¤ò¤¤¤¸¤¯¤ë¤³¤È¤Ç¡¢¶¥¹ç¾ò·ï¤òºî¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£ -³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤òºï½ü¤Ç¤¤Ê¤¤¡¢¤Þ¤¿¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë¤È¡¢ -¥Æ¥ó¥Ý¥é¥ê¤È¤·¤Æ¡¢¥Õ¥¡¥¤¥ë¤Ë¥Þ¡¼¥¯¤ò¤Ä¤±¤ë¤³¤È¤Î¤Ç¤¤Ê¤¤¡¢¥·¥¹¥Æ¥à¤Ç¤Ï +¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤À¤±¤ò»ý¤Ä¤Î¤Ê¤é¡¢¤³¤ì¤Ï¹¥¤Þ¤·¤¤ÊýË¡¤Ç¤¹; +¥Õ¥¡¥¤¥ë¥Í¡¼¥à¤òÊѹ¹¤¹¤ë¤³¤È¤Ç¶¥¹ç¾ò·ï¤òºî¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤òºï½ü¤Ç¤¤Ê¤¤¡¢¤¢¤ë¤¤¤Ï¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤¤¤ë¤È +°ì»þŪ¤Ç¤¢¤ë¤È¤·¤Æ¥Õ¥¡¥¤¥ë¤Ë¥Þ¡¼¥¯¤ò¤Ä¤±¤ë¤³¤È¤Î¤Ç¤¤Ê¤¤¥·¥¹¥Æ¥à¤Ç¤Ï (¤¿¤È¤¨¤Ð¡¢Windows NT ¤Ï¡¢C<O_TEMPORARY> ¥Õ¥é¥°¤ò»È¤¤¤Þ¤¹)¡¢ -¥Õ¥¡¥¤¥ë¤Ï¡¢¥×¥í¥°¥é¥à¤¬½ª¤ë¤È¤¤Ë¡¢ºï½üÍѤΥޡ¼¥¯¤¬¤Ä¤±¤é¤ì¤Þ¤¹ +¥Õ¥¡¥¤¥ë¤Ï¡¢¥×¥í¥°¥é¥à¤Î½ªÎ»»þ¤Ë¡¢ºï½üÍѤΥޡ¼¥¯¤¬¤Ä¤±¤é¤ì¤Þ¤¹ (UNLINK ¤ò 1 ¤ËÀßÄꤹ¤ë¤Î¤ÈƱ¤¸)¡£ C<UNLINK> ¥Õ¥é¥°¤Ï¡¢¤¢¤Ã¤Æ¤â̵»ë¤µ¤ì¤Þ¤¹¡£ @@ -346,15 +363,13 @@ =end original -¤³¤ì¤Ï¡¢¥Æ¥ó¥×¥ì¡¼¥È¤ò¸µ¤Ë¤·¤¿¡¢¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ -¤Ç¤¹¤¬¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ò³«¤¤Þ¤»¤ó¡£ -UNILINK ¤ò¿¿¤Ë¥»¥Ã¥È¤·¤Æ¤Ï¡¢°ì½ï¤Ë»È¤¨¤Þ¤»¤ó¡£ -¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤¤¤Ä¤â¡¢¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¡¢ -¶¥¹ç¾ò·ï¤Î²ÄǽÀ¤«¤éÊݸ¤Þ¤¹¡£ -·Ù¹ð¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ì¤Ð¡¢·Ù¹ð¤¬½Ð¤µ¤ì¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¤ò³«¤¯¤³¤È¤òÍ׵ᤷ¤Ê¤¤¤Ê¤é¡¢ -¤³¤Î¥É¥¥å¥á¥ó¥È¤Î¾¤Î¤É¤³¤«¤ËÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¡¢ -tmpnam() ¤È¡¢mktemp() ´Ø¿ô¤ò»È¤¦¤³¤È¤ò¹Í¤¨¤Æ¤¯¤À¤µ¤¤¡£ +¤³¤ì¤Ï¥Æ¥ó¥×¥ì¡¼¥È¤ò¸µ¤Ë¤·¤¿¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¤¬¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ò +³«¤¤Þ¤»¤ó¡£ +UNILINK ¤ò¿¿¤ËÀßÄꤹ¤ë¤Î¤ÈƱ»þ¤Ë¤Ï»È¤¨¤Þ¤»¤ó¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¾ï¤Ë¥Õ¥¡¥¤¥ë¤ò³«¤¡¢¶¥¹ç¾ò·ï¤Î²ÄǽÀ¤«¤éÊݸ¤Þ¤¹¡£ +·Ù¹ð¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¡¢·Ù¹ð¤¬½ÐÎϤµ¤ì¤Þ¤¹¡£ +¥Õ¥¡¥¤¥ë¤ò³«¤¯¤³¤È¤òÍ׵ᤷ¤Ê¤¤¤Ê¤é¡¢¤³¤Îʸ½ñ¤Î¾¤Î¾ì½ê¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë +tmpnam() ¤È¡¢mktemp() ´Ø¿ô¤ò»È¤¦¤³¤È¤ò¸¡Æ¤¤·¤Æ¤¯¤À¤µ¤¤¡£ =begin original @@ -373,7 +388,7 @@ =end original -¤³¤ì¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤¹¤ë¤¿¤á¤Î¿ä¾©¤µ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¹¡£ +¤³¤ì¤Ï¡¢°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤¹¤ë¤¿¤á¤Î¿ä¾©¤µ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¹¡£ ¤³¤Î´Ø¿ô¤Î¿¶Éñ¤Ï°ú¿ô¤Ë¤è¤ê¤Þ¤¹: $tempdir = tempdir(); @@ -384,7 +399,8 @@ =end original -tmpdir() ¤Ç¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤¹(L<File::Spec|File::Spec> ¤ò¸«¤Æ¤¯¤À¤µ¤¤)¡£ +tmpdir() ¤Ç¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤¹ +(L<File::Spec|File::Spec> ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤)¡£ $tempdir = tempdir( $template ); @@ -399,9 +415,9 @@ Ä󶡤µ¤ì¤¿¥Æ¥ó¥×¥ì¡¼¥È¤«¤é¡¢¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤¹¡£ ¤³¤Î¥Æ¥ó¥×¥ì¡¼¥È¤Ï tempfile() ¤ÇÀâÌÀ¤µ¤ì¤¿¤â¤Î¤È»÷¤Æ¤¤¤Þ¤¹¡£ -¥Æ¥ó¥×¥ì¡¼¥È¤Î½ª¤ê¤Î¡¢`X' ʸ»ú¤Ï¥é¥ó¥À¥à¤Êʸ»ú¤ËÃÖ¤´¹¤¨¤é¤ì¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¤ÎËöÈø¤Î `X' ʸ»ú¤Ï¥é¥ó¥À¥à¤Êʸ»ú¤ËÃÖ¤´¹¤¨¤é¤ì¡¢ ¥Ç¥£¥ì¥¯¥È¥ê̾¤òºî¤ê¤Þ¤¹¡£ -¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤Ï¡¢¾¯¤Ê¤¯¤È¤â¡¢4 ¤Ä¤Î `X' ʸ»ú¤¬¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£ +¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤Ï¾¯¤Ê¤¯¤È¤â»Í¤Ä `X' ʸ»ú¤¬¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£ $tempdir = tempdir ( DIR => $dir ); @@ -412,8 +428,8 @@ =end original -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë»È¤¦¥Ç¥£¥ì¥¯¥È¥ê¤òÆÃÄꤷ¤Þ¤¹¡£ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê̾¤Ï¡¢ÆâÉô¤Î¥Æ¥ó¥×¥ì¡¼¥È¤«¤éÀ¸À®¤µ¤ì¤Þ¤¹¡£ +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤Ë»È¤¦¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£ +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê̾¤Ï¡¢ÆâÉô¤Î¥Æ¥ó¥×¥ì¡¼¥È¤«¤éÀ¸À®¤µ¤ì¤Þ¤¹¡£ $tempdir = tempdir ( $template, DIR => $dir ); @@ -426,9 +442,9 @@ =end original -Ä󶡤µ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¡¢¥Æ¥ó¥×¥ì¡¼¥È¤Ë preend ¤·¤Þ¤¹¡£ -¥Æ¥ó¥×¥ì¡¼¥È¤Ï¡¢¿Æ¥Ç¥£¥ì¥¯¥È¥ê¤Î»ÅÍͤ½¤Î¤â¤Î¤ò´Þ¤à¤Ù¤¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ -Ä󶡤µ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤¬¡¢prepend ¤¹¤ëÁ°¤Ë¡¢¿Æ¥Ç¥£¥ì¥¯¥È¥ê¤Î»ÅÍͤϡ¢ +»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¥Æ¥ó¥×¥ì¡¼¥È¤ËÁ°ÃÖ¤·¤Þ¤¹¡£ +¥Æ¥ó¥×¥ì¡¼¥È¤Ï¡¢¿Æ¥Ç¥£¥ì¥¯¥È¥ê»ØÄꤽ¤Î¤â¤Î¤ò´Þ¤à¤Ù¤¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤òÁ°ÃÖ¤¹¤ëÁ°¤Ë¡¢¿Æ¥Ç¥£¥ì¥¯¥È¥ê»ØÄê¤Ï ¥Æ¥ó¥×¥ì¡¼¥È¤«¤éºï½ü¤µ¤ì¤Þ¤¹¡£ $tempdir = tempdir ( $template, TMPDIR => 1 ); @@ -440,9 +456,9 @@ =end original -Ä󶡤µ¤ì¤¿ template ¤ò»È¤¦¤È¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î¤¿¤á¤Îɸ½à¤Î¾ì½ê¤Ë¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤òºî¤ê¤Þ¤¹¡£ -¼¡¤Î¤è¤¦¤Ë¤¹¤ë¤Î¤ÈƱ¤¸¤Ç¤¹¡£ +»ØÄꤵ¤ì¤¿ template ¤ò»È¤¦¤È¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Î¤¿¤á¤Îɸ½à¤Î¾ì½ê¤Ë¡¢ +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òºî¤ê¤Þ¤¹¡£ +¼¡¤Î¤è¤¦¤Ë¤¹¤ë¤Î¤ÈƱ¤¸¤Ç¤¹¤¬: $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir); @@ -455,13 +471,11 @@ =end original -¤Ç¤¹¤¬¡¢¾å¤ÎÊý¤¬¡¢Ã»¤¤¡£ -¿Æ¥Ç¥£¥ì¥¯¥È¥ê¤Î»ÅÍͤϥƥó¥×¥ì¡¼¥È¼«¿È¤«¤é¡¢ -¤Ï¤®¼è¤é¤ì¤Þ¤¹¡£ -C<TMPDIR> ¥ª¥×¥·¥ç¥ó¤Ï C<DIR> ¤¬¡¢ÌÀ¼¨Åª¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢ -̵»ë¤µ¤ì¤Þ¤¹¡£ -²Ã¤¨¤Æ¡¢¥Æ¥ó¥×¥ì¡¼¥È¤â¥Ç¥£¥ì¥¯¥È¥ê¤âÄ󶡤µ¤ì¤Ê¤±¤ì¤Ð¡¢ -C<TMPDIR> ¤Ï¡¢°Å¤Ë¤Õ¤¯¤Þ¤ì¤Þ¤¹¡£ +¾å¤ÎÊý¤¬¡¢Ã»¤¯¤Ê¤ê¤Þ¤¹¡£ +¿Æ¥Ç¥£¥ì¥¯¥È¥ê»ØÄê¤Ï¥Æ¥ó¥×¥ì¡¼¥È¼«¿È¤«¤é½üµî¤µ¤ì¤Þ¤¹¡£ +C<DIR> ¤¬ÌÀ¼¨Åª¤ËÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð C<TMPDIR> ¥ª¥×¥·¥ç¥ó¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£ +²Ã¤¨¤Æ¡¢¥Æ¥ó¥×¥ì¡¼¥È¤â¥Ç¥£¥ì¥¯¥È¥ê¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢ +C<TMPDIR> ¤¬²¾Äꤵ¤ì¤Þ¤¹¡£ $tempdir = tempdir( $template, CLEANUP => 1); @@ -478,16 +492,16 @@ =end original -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤òÄ󶡤µ¤ì¤¿¥Æ¥ó¥×¥ì¡¼¥È¤ò»È¤Ã¤ÆºîÀ®¤·¤Þ¤¹¡£ -¤Ç¤¹¤¬¡¢¥×¥í¥°¥é¥à¤¬½ªÎ»¤¹¤ë¤È¤¤Ë¡¢¤½¤ì(¤È¡¢¤½¤ÎÃæ¤ÎÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë)¤ò +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òÄ󶡤µ¤ì¤¿¥Æ¥ó¥×¥ì¡¼¥È¤ò»È¤Ã¤ÆºîÀ®¤·¤Þ¤¹¤¬¡¢ +¥×¥í¥°¥é¥à¤¬½ªÎ»¤¹¤ë¤È¤¤Ë¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê(¤ª¤è¤Ó¤½¤ÎÃæ¤ÎÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë)¤ò ºï½ü¤·¤è¤¦¤È¤·¤Þ¤¹¡£ -»î¤ß¤Ï¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤¬ºî¤Ã¤Æ¤¤¤Ê¤¤¤â¤Î¤Þ¤Ç¤â¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¡¢ -Á´¤Æ¤Î¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤è¤¦¤È¤·¤Þ¤¹ (otherwise why ask to clean it up?)¡£ -¥Ç¥£¥ì¥¯¥È¥ê¤Î½üµî¤Ï¡¢L<File::Path|File::Path> ¤Î rmtree() ´Ø¿ô¤Ç¡¢ +¤³¤Î»î¤ß¤Ï¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤¬ºî¤Ã¤Æ¤¤¤Ê¤¤¤â¤Î¤â´Þ¤á¤Æ¡¢ +¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤«¤éÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤òºï½ü¤·¤è¤¦¤È¤·¤Þ¤¹ +(¤µ¤â¤Ê¤±¤ì¤Ð¤Ê¤¼ºï½ü¤¹¤ë¤«¿Ò¤Í¤Þ¤¹¤«?)¡£ +¥Ç¥£¥ì¥¯¥È¥ê¤Î½üµî¤Ï L<File::Path|File::Path> ¤Î rmtree() ´Ø¿ô¤Ç ¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£ ¤â¤Á¤í¤ó¡¢¥Æ¥ó¥×¥ì¡¼¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢tempdir() ¤Ëºî¤é¤ì¡¢¥×¥í¥°¥é¥à¤Î½ªÎ»»þ¤Ë¡¢ -ºï½ü¤µ¤ì¤Þ¤¹¡£ +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤Ï tempdir() ¤Ëºî¤é¤ì¡¢¥×¥í¥°¥é¥à¤Î½ªÎ»»þ¤Ëºï½ü¤µ¤ì¤Þ¤¹¡£ =back @@ -502,8 +516,8 @@ =end original -²¼µ¤Î´Ø¿ô¤Ï¡¢temp ¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¡¢ -mktemp() ¤ÎÃç´Ö¤Î¡¢Perl ¤Î¼ÂÁõ¤Ç¤¹¡£ +°Ê²¼¤Î´Ø¿ô¤Ï¡¢°ì»þ¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë +mktemp() ¤ÎÃç´Ö¤Î Perl ¤Î¼ÂÁõ¤Ç¤¹¡£ =over 4 @@ -516,8 +530,7 @@ =end original -¥Æ¥ó¥×¥ì¡¼¥È¤òÍ¿¤¨¤ë¤È¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¡¢¥Õ¥¡¥¤¥ë̾¤ò -ÊÖ¤·¤Þ¤¹¡£ +¥Æ¥ó¥×¥ì¡¼¥È¤òÍ¿¤¨¤ë¤È¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ ($fh, $name) = mkstemp( $template ); @@ -537,9 +550,9 @@ =end original -¥Æ¥ó¥×¥ì¡¼¥È¤Ï¡¢¤¤¤¯¤Ä¤«¤Î `X' ¤¬¤Ä¤±¤é¤ì¤¿¥Õ¥¡¥¤¥ë̾¤Ç¤·¤ç¤¦¡£ -¤¿¤È¤¨¤Ð¡¢F</tmp/tmp.XXXX>¡£ -¸å¤Î X ¤Ï¡¢¥æ¥Ë¡¼¥¯¤Ê±Ñ¿ô»ú¤ÎÁȹ礻¤ËÃÖ¤´¹¤¨¤é¤ì¤Þ¤¹¡£ +¥Æ¥ó¥×¥ì¡¼¥È¤Ï¡¢¤¤¤¯¤Ä¤«¤Î `X' ¤¬Äɲ䵤줿¥Õ¥¡¥¤¥ë̾¤«¤â¤·¤ì¤Þ¤»¤ó; +Î㤨¤Ð F</tmp/tmp.XXXX>¡£ +ËöÈø¤Î X ¤Ï¡¢¥æ¥Ë¡¼¥¯¤Ê±Ñ¿ô»ú¤ÎÁȹ礻¤ËÃÖ¤´¹¤¨¤é¤ì¤Þ¤¹¡£ =item B<mkstemps> @@ -551,9 +564,8 @@ =end original -mkstemp() ¤Ë»÷¤Æ¤¤¤Þ¤¹¡£ -¤¿¤À¤·¡¢ÆÃÊ̤ʰú¿ô¤òÍ¿¤¨¤Æ¡¢ -¥Æ¥ó¥×¥ì¡¼¥È¤ËÀÜÈø»ú¤òÄɲ乤뤳¤È¤¬¤Ç¤¤Þ¤¹¡£ +mkstemp() ¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢ÆÃÊ̤ʰú¿ô¤òÍ¿¤¨¤Æ¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¤ËÀÜÈø¼¤òÄɲäǤ¤Þ¤¹¡£ ($fh, $name) = mkstemps( $template, $suffix ); @@ -564,8 +576,8 @@ =end original -Î㤨¤Ð¡¢C<testXXXXXX> ¤Î¥Æ¥ó¥×¥ì¡¼¥È¤È¡¢C<.dat> ¤ÎÀÜÈø»ú¤Ï¡¢ -F<testthGji_w.dat> ¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤Ç¤·¤ç¤¦¡£ +Î㤨¤Ð¡¢¥Æ¥ó¥×¥ì¡¼¥È ¤¬ C<testXXXXXX> ¤ÇÀÜÈø¼¤¬ C<.dat> ¤Ê¤é¡¢ +F<testthGji_w.dat> ¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ =begin original @@ -573,7 +585,7 @@ =end original -¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¤¿¤À¡¢¥Õ¥¡¥¤¥ë̾¤À¤±¤òÊÖ¤·¤Þ¤¹¡£ +¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¤¿¤À¥Õ¥¡¥¤¥ë̾¤À¤±¤òÊÖ¤·¤Þ¤¹¡£ =item B<mkdtemp> @@ -597,8 +609,8 @@ =end original -ºîÀ®¤µ¤ì¤¿¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤Î̾Á°¤òÊÖ¤·¤Þ¤¹¡£ -¼ºÇÔ¤¹¤ë¤È undef ¤¬ÊÖ¤ê¤Þ¤¹¡£ +ºîÀ®¤µ¤ì¤¿°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤Î̾Á°¤òÊÖ¤·¤Þ¤¹¡£ +¼ºÇÔ¤¹¤ë¤È undef ¤òÊÖ¤·¤Þ¤¹¡£ =begin original @@ -617,8 +629,8 @@ =end original -ÂÅÅö¤Ê¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ -¤Ç¤¹¤¬¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤¬¡¢Â¾¤Î狼¤Ë³«¤«¤ì¤Æ¤¤¤Ê¤¤¤È¤ÏÊݾڤ·¤Þ¤»¤ó¡£ +ÂÅÅö¤Ê°ì»þ¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ +¤Ç¤¹¤¬¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤¬¡¢Â¾¤Î狼¤Ë³«¤«¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ÏÊݾڤ·¤Þ¤»¤ó¡£ $unopened_file = mktemp($template); @@ -644,8 +656,8 @@ =end original -¤³¤Î¥»¥¯¥·¥ç¥ó¤Ï¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤«¤é mkstemp() ¤ò»È¤Ã¤Æ¤¤¤ë¡¢ -L<POSIX> ¤ËÀâÌÀ¤µ¤ì¤Æ¤¤¤ë tmpnam() ¤È tmpfile() ´Ø¿ô¤ÎºÆ¼ÂÁõ¤òÀâÌÀ¤·¤Æ¤¤¤Þ¤¹¡£ +¤³¤ÎÀá¤Ï¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤«¤é mkstemp() ¤ò»È¤Ã¤Æ¤¤¤ë¡¢L<POSIX> ¤Ë +ÀâÌÀ¤µ¤ì¤Æ¤¤¤ë tmpnam() ¤È tmpfile() ´Ø¿ô¤ÎºÆ¼ÂÁõ¤òÀâÌÀ¤·¤Æ¤¤¤Þ¤¹¡£ =begin original @@ -659,12 +671,12 @@ =end original -L<POSIX|POSIX> ¤Î¼ÂÁõ¤È¤Ï°ã¤¤¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Ë»È¤ï¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ +L<POSIX|POSIX> ¤Î¼ÂÁõ¤È¤Ï°ã¤¤¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Ë»È¤ï¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ ¥·¥¹¥Æ¥àÆâÉô¤Î¥Õ¥¡¥¤¥ë (C<P_tmpdir>) ¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ ñ½ã¤Ë¡¢L<File::Spec|File::Spec> ¤Ë¤è¤Ã¤Æ¡¢tmpdir() ¤¬ÊÖ¤¹¤â¤Î¤ÎÁªÂò¤Ë °Í¤Ã¤Æ¤¤¤Þ¤¹¡£ -¼ÂÁõ¤Ë¤è¤Ã¤Æ¤Ï¡¢¤³¤Î¾ì½ê¤Ï¡¢C<TMPDIR> ´Ä¶ÊÑ¿ô¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -¤³¤ì¤Ï¡¢°ÂÁ´¤Ç¤Ï¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +¼ÂÁõ¤Ë¤è¤Ã¤Æ¤Ï¡¢¤³¤Î¾ì½ê¤Ï¡¢C<TMPDIR> ´Ä¶ÊÑ¿ô¤ò»È¤Ã¤Æ +ÀßÄꤵ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡¢¤³¤ì¤Ï°ÂÁ´¤Ç¤Ï¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ ¤³¤Î¤³¤È¤¬ÌäÂê¤Ê¤é¡¢Ã±½ã¤Ë¡¢mkstemp() ¤ò»È¤¤¡¢¥Æ¥ó¥×¥ì¡¼¥È¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡£ =over 4 @@ -680,7 +692,7 @@ =end original -¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤¿¤é¡¢(mktemp() ¤ò»È¤¦)¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î +¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤¿¤é¡¢(mktemp() ¤ò»È¤¦)°ì»þ¥Õ¥¡¥¤¥ë¤Î (¥Ñ¥¹¤ò´Þ¤ó¤À)¥Õ¥ë¥Í¡¼¥à¤òÊÖ¤·¤Þ¤¹¡£ ¥Õ¥¡¥¤¥ë¤¬´û¤Ë¸ºß¤·¤Ê¤¤¤³¤È¤À¤±¤ò¥Á¥§¥Ã¥¯¤·¤Þ¤¹¤¬¡¢ ¤½¤Î¾õÂÖ¤¬Å¬ÍѤµ¤ì³¤±¤ëÊݾڤϤ¢¤ê¤Þ¤»¤ó¡£ @@ -695,10 +707,10 @@ =end original -ÇÛÎó¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¯¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¡¢ +¥ê¥¹¥È¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¯¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È ¥Õ¥¡¥¤¥ë̾¤¬ÊÖ¤ê¤Þ¤¹¡£ -ŬÀڤʥƥó¥×¥ì¡¼¥È¤òÁȤßΩ¤Æ¤¿¸å¤Ë¡¢ -mkstemp() ¤ò¸Æ¤Ö¤³¤È¤Ç¡¢À®¸ù¤·¤Þ¤¹¡£ +¤³¤ì¤Ï¡¢Å¬Àڤʥƥó¥×¥ì¡¼¥È¤òÁȤßΩ¤Æ¤¿¸å¤Ë mkstemp() ¤ò¸Æ¤Ö¤³¤È¤Ç +ãÀ®¤µ¤ì¤Þ¤¹¡£ ($fh, $file) = tmpnam(); @@ -709,7 +721,7 @@ =end original -²Äǽ¤Ê¤é¡¢ÀøºßŪ¤Ê¶¥¹ç¾õÂÖ¤òËɤ°¤¿¤á¤Ë¡¢¤³¤Î·Á¤Ç»È¤¦¤Ù¤¤Ç¤¹¡£ +²Äǽ¤Ê¤é¡¢ÀøºßŪ¤Ê¶¥¹ç¾õÂÖ¤òËɤ°¤¿¤á¤Ë¤³¤Î·Á¤Ç»È¤¦¤Ù¤¤Ç¤¹¡£ =begin original @@ -718,9 +730,9 @@ =end original -ÆÃÄê¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ç¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤òÁªÂò¤¹¤ë¾ðÊó¤Ë¡¢ -L<File::Spec/tmpdir> ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ +ÆÃÄê¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ç +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤òÁªÂò¤¹¤ë¤¿¤á¤Î¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +L<File::Spec/tmpdir> ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ =item B<tmpfile> @@ -730,7 +742,7 @@ =end original -¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤·¤Þ¤¹¡£ +¥¹¥«¥é¥³¥ó¥Æ¥¥¹¥È¤Ç¤Ï¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤òÊÖ¤·¤Þ¤¹¡£ $fh = tmpfile(); @@ -753,9 +765,9 @@ =end original -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬ºî¤é¤ì¤Ê¤±¤ì¤Ð¡¢undef ¤¬ÊÖ¤ê¤Þ¤¹¡£ -¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤¬¡¢NFS¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¾ì¹ç¡¢ -¸½ºß¤Î¤È¤³¤í¡¢¤³¤Î¥³¥Þ¥ó¥É¤Ï¡¢¤ª¤½¤é¤¯Æ°¤¤Þ¤»¤ó¡£ +°ì»þ¥Õ¥¡¥¤¥ë¤¬ºî¤é¤ì¤Ê¤±¤ì¤Ð¡¢undef ¤¬ÊÖ¤ê¤Þ¤¹¡£ +°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤¬ NFS ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¾ì¹ç¡¢ +¸½ºß¤Î¤È¤³¤í¤³¤Î¥³¥Þ¥ó¥É¤Ï¤ª¤½¤é¤¯Æ°¤¤Þ¤»¤ó¡£ =back @@ -770,8 +782,8 @@ =end original -¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¶¦Ä̤Υƥó¥Ý¥é¥ê¥Õ¥¡¥¤¥ëÀ¸À®¤ÎC¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Î -¸åÊý¸ß´¹¤Î¤¿¤á¤Ë¡¢Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¶¦Ä̤ΰì»þ¥Õ¥¡¥¤¥ëÀ¸À®¤Î C ¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Î +¸åÊý¸ß´¹¤Î¤¿¤á¤ËÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ =begin original @@ -780,7 +792,7 @@ =end original -¥¤¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢´°Á´¤Ê¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò»È¤Ã¤Æ +¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢´°Á´¤Ê¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò»È¤Ã¤Æ µ½Ò¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ =over 4 @@ -797,10 +809,9 @@ =end original -preix ¤ò»È¤Ã¤Æ»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¡¢ -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ +ÀÜƬ¼¤ò»È¤Ã¤Æ»ØÄꤷ¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë̾¤òÊÖ¤·¤Þ¤¹¡£ ¥Õ¥¡¥¤¥ë¤Ï´Ø¿ô¤¬¸Æ¤Ð¤ì¤¿¤½¤Î¤È¤¤Ë¸ºß¤·¤Æ¤¤¤Ê¤¤¤³¤È¤òÊݾڤµ¤ì¤Þ¤¹¡£ -¤Ç¤¹¤¬¡¢»þ·×¤¬¥«¥Á¤Ã¤È¤¤¤¦´Ö¤Ë´Ø¤·¤Æ¤Î¤ß¤ÎÊݾڤǤ¹¡£ +¤Ç¤¹¤¬¡¢¤³¤ÎÊݾڤϰì½Ö¤À¤±¤Î¤â¤Î¤Ç¤¹¡£ ¤½¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë̾¤ò³«¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤Ê¤é¡¢ C<O_CREAT | O_EXCL> ¤Ç¡¢C<sysopen> ¤ÎŬÀڤʷÁ¤ò¾ï¤Ë»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ @@ -822,7 +833,7 @@ =end original -¤³¤Î´Ø¿ô¤Ï¡¢mktemp() ¤ò»È¤¦¤Î¤Ç¡¢¶¥¹ç¾õÂÖ¤«¤éÈï³²¤òÈï¤ê¤¨¤Þ¤¹¡£ +¤³¤Î´Ø¿ô¤Ï mktemp() ¤ò»È¤¦¤Î¤Ç¡¢¶¥¹ç¾õÂ֤αƶÁ¤ò¼õ¤±¤Þ¤¹¡£ =back @@ -836,7 +847,7 @@ =end original -¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¥Õ¥¡¥¤¥ë̾¤ò°·¤¦¡¢Í±×¤Ê´Ø¿ô¡£ +¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¥Õ¥¡¥¤¥ë̾¤ò°·¤¦¤¿¤á¤ÎÊØÍø´Ø¿ô¡£ =over 4 @@ -855,18 +866,16 @@ =end original -³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¡¢´ØÏ¢¤Ä¤±¤é¤ì¤¿¥Õ¥¡¥¤¥ë̾¤òÍ¿¤¨¤ë¤È¡¢ -°ÂÁ´¤Ë¡¢ºï½ü¤·¤Þ¤¹¡£ -¤³¤ì¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤È¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬¡¢ -Ʊ¤¸¥Õ¥¡¥¤¥ë¤ò»Ø¤·¡¢¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯¤Î¿ô¤¬¡¢°ì¤Ä¤Ç¤¢¤ë¤³¤È) +³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¡¢´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥Õ¥¡¥¤¥ë̾¤òÍ¿¤¨¤ë¤È¡¢ +°ÂÁ´¤Ëºï½ü¤·¤Þ¤¹¡£ +¤³¤ì¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤È¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬Æ±¤¸¥Õ¥¡¥¤¥ë¤ò»Ø¤·¡¢ +¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯¤Î¿ô¤¬¡¢°ì¤Ä¤Ç¤¢¤ë¤³¤È (stat()¤¬ÊÖ¤¹Á´¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤¬Èæ³Ó¤µ¤ì¤Þ¤¹)¤ò ºÇ½é¤Ë¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤Ç¡¢¼Â¸½¤·¤Þ¤¹¡£ -¤½¤ì¤«¤é¡¢¥Õ¥¡¥¤¥ë̾¤¬ºï½ü¤µ¤ì¤Æ¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬¡¢¤â¤¦°ìÅÙ¡¢ºÆ¤Ó¡¢ -¥Á¥§¥Ã¥¯¤µ¤ì¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯¤Î¿ô¤¬º£Å٤ϡ¢0¤Ç¤¢¤ë¤³¤È¤ò¸¡¾Ú¤·¤Þ¤¹¡£ +¤½¤ì¤«¤é¥Õ¥¡¥¤¥ë̾¤¬ºï½ü¤µ¤ì¤Æ¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤¬ºÆ¤Ó¥Á¥§¥Ã¥¯¤µ¤ì¡¢ +¤½¤Î¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯¤Î¿ô¤¬º£ÅÙ¤Ï 0 ¤Ç¤¢¤ë¤³¤È¤ò¸¡¾Ú¤·¤Þ¤¹¡£ ¤³¤Î¤³¤È¤Ï¡¢ÊÝ»ý¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Èºï½ü¤µ¤ì¤¿¥Õ¥¡¥¤¥ë̾¤¬ Ʊ¤¸¤Ç¤¢¤ë¤³¤È¤ò³Î¤«¤á¤ë¤Î¤Ë¡¢ºÇ¤â¼þÅþ¤Ç¤¹¡£ -¥¨¥é¡¼»þ¤Ë¤Ïµ¶¤¬Ê֤ꡣ -¾õ¶·¤Ë¤è¤ê¡¢É¬ÍפȤµ¤ì¤Ê¤¤¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Ï¡¢ÊĤ¸¤é¤ì¤Þ¤»¤ó¡£ =begin original @@ -883,11 +892,11 @@ ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë¤è¤Ã¤Æ¤Ï(Î㤨¤Ð¡¢Windows NT)¡¢³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ò ºï½ü¤Ç¤¤Ê¤¤¤â¤Î¤â¤¢¤ê¤Þ¤¹ (¥Õ¥¡¥¤¥ë¤Ï¤Þ¤ºÊĤ¸¤é¤ì¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó)¡£ -¤½¤ì¤é¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Ï¡¢ -¥×¥í¥°¥é¥à¤¬½ªÎ»¤·¡¢Îɤ¤¾õÂ֤ˤʤë¤Þ¤Ç¡¢¼ÂºÝ¤Îºï½ü¤Ï¿ø¤¨ÃÖ¤«¤ì¤Þ¤¹¡£ -¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¡¢¥Õ¥¡¥¤¥ë̾¤¬Æ±¤¸¤Î¤ò»Ø¤¹»ö¤ò³Î¤«¤á¤ë¤Þ¤Ç¡¢¥Á¥§¥Ã¥¯¤Ï +¤½¤ì¤é¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Ï¡¢¥×¥í¥°¥é¥à¤¬½ªÎ»¤·¡¢Îɤ¤¾õÂ֤ˤʤë¤Þ¤Ç¡¢ +¼ÂºÝ¤Îºï½ü¤Ï¿ø¤¨ÃÖ¤«¤ì¤Þ¤¹¡£ +¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤È¥Õ¥¡¥¤¥ë̾¤¬Æ±¤¸¤Î¤ò»Ø¤¹»ö¤ò³Î¤«¤á¤ë¤Þ¤Ç¡¢¥Á¥§¥Ã¥¯¤Ï ¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£ -(¤Ç¤¹¤¬¡¢ºÇ¸å¤Î¥Ö¥í¥Ã¥¯¤¬¼Â¹Ô¤µ¤ì¤¿»þÅÀ¤Ç¤Ê¤±¤ì¤Ð¡¢ +(¤·¤«¤·¡¢ºÇ¸å¤Î¥Ö¥í¥Ã¥¯¤¬¼Â¹Ô¤µ¤ì¤¿»þÅÀ¤Ç¤Ê¤±¤ì¤Ð¡¢ ¿ø¤¨ÃÖ¤«¤ì¤¿ºï½ü¤Ï¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Ë¥¢¥¯¥»¥¹¤·¤Ê¤¤¤Ç¤·¤ç¤¦¡£) =begin original @@ -902,14 +911,13 @@ =end original -¤µ¤é¤Ë¡¢Windows NT ¤Ï¡¢stat()¤¬Á´¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤òÊÖ¤µ¤Ê¤¤¤³¤È¤¬ -Èæ³Ó¤µ¤ìÆÀ¤Þ¤¹¡£ -Î㤨¤Ð¡¢C<dev> ¤È¡¢C<rdev> ¥Õ¥£¡¼¥ë¥É¤Ï¡¢°ã¤Ã¤Æ¤¤¤Þ¤¹¡£ -¤Þ¤¿¡¢stat() ¤¬ÊÖ¤¹¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤Ï¡¢¾ï¤Ë¤Ï°ìÃפ·¤Þ¤»¤ó¡£ -C<stat(FH)> ¤Ï¡¢C<stat(filename)> ¤è¤ê¤â¡¢¶¸¤¤¤¬¤¢¤ê¤Þ¤»¤ó¡£ -»×¤¦¤Ë¡¢¥¥ã¥Ã¥·¥ó¥°¤ÎÌäÂê¤Ë¤è¤ê¡¢¥ª¡¼¥È¥Õ¥é¥Ã¥·¥å¤ò»È¤Ã¤Æ¤¤¤¿¤Ë¤»¤è¡¢ -(¤³¤ì¤Ï¡¢ÉáÄÌ¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Ë½ñ¤¹þ¤ó¤À¸å¡¢¤½¤ì¤ò C<unlink0> ¤¬»î¤µ¤ì¤ëÁ°¤Ë¡¢ -¤·¤Ð¤é¤¯ÂԤĤ³¤È¤Ç¡¢Âнè¤Ç¤¤Þ¤¹¡£) +¤µ¤é¤Ë¡¢Windows NT ¤Ï¡¢stat() ¤¬Èæ³Ó¤µ¤ì¤ëÁ´¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤òÊÖ¤·¤Þ¤»¤ó¡£ +Î㤨¤Ð¡¢C<dev> ¤È C<rdev> ¥Õ¥£¡¼¥ë¥É¤Ï°Û¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£ +¤Þ¤¿¡¢stat() ¤¬ÊÖ¤¹¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤Ï¡¢¾ï¤Ë¤Ï°ìÃפ·¤Þ¤»¤ó; +C<stat(FH)> ¤Ï¡¢C<stat(filename)> ¤è¤ê¤â¡¢¶¸¤¤¤¬¤¢¤ê¤Þ¤»¤ó; +¤ª¤½¤é¤¯¡¢Î㤨¼«Æ°¥Õ¥é¥Ã¥·¥å¤ò»È¤Ã¤Æ¤¤¤Æ¤â¡¢¥¥ã¥Ã¥·¥ó¥°¤ÎÌäÂê¤Ë¤è¤ë¤â¤Î¤Ç¤¹ +(¤³¤ì¤ÏÉáÄÌ¡¢°ì»þ¥Õ¥¡¥¤¥ë¤Ë½ñ¤¹þ¤ó¤À¸å¡¢¤½¤ì¤ò C<unlink0> ¤¬»î¤µ¤ì¤ëÁ°¤Ë +¤·¤Ð¤é¤¯ÂԤĤ³¤È¤Ç¡¢Âнè¤Ç¤¤Þ¤¹)¡£ =begin original @@ -919,9 +927,9 @@ =end original -ºÇ¸å¤Ë¡¢NFS¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤Ï¡¢ ¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Î¥ê¥ó¥¯¥«¥¦¥ó¥È¤Ï¡¢ -ºï½ü¤Î¸å¡¢¤¹¤°¤Ë¤Ï¡¢¾ï¤Ë¤Ï0¤Ë¤Ê¤ê¤Þ¤»¤ó¡£ -¸½ºß¡¢¤³¤Î¥³¥Þ¥ó¥É¤Ï¡¢NFS¥Ç¥£¥¹¥¯¾å¤Ç¤Ï¡¢¼ºÇÔ¤¹¤ë¤È»×¤¤¤Þ¤¹¡£ +ºÇ¸å¤Ë¡¢NFS ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤Ï¡¢ ¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Î¥ê¥ó¥¯¥«¥¦¥ó¥È¤Ï¡¢ +ºï½ü¤Î¸å¡¢¤¹¤°¤Ë¤Ï¡¢¾ï¤Ë¤Ï 0 ¤Ë¤Ê¤ê¤Þ¤»¤ó¡£ +¸½ºß¤³¤Î¥³¥Þ¥ó¥É¤Ï¡¢NFS ¥Ç¥£¥¹¥¯¾å¤Ç¤Ï¼ºÇÔ¤¹¤ë¤ÈÁÛÄꤵ¤ì¤Þ¤¹¡£ =back @@ -935,7 +943,7 @@ =end original -¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸¤Î¥°¥í¡¼¥Ð¥ë¤Ê¾õÂÖ¤ò¥³¥ó¥È¥í¡¼¥ë¤·¤Þ¤¹¡£ +¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸¤Î¥°¥í¡¼¥Ð¥ë¤Ê¾õÂÖ¤òÀ©¸æ¤·¤Þ¤¹¡£ =over 4 @@ -949,8 +957,8 @@ =end original -¤³¤Î¥â¥¸¥å¡¼¥ë¤¬¡¢½èÍýÁ°¤Ë¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤«¡¢¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤ò¡¢ -°ÂÁ´¤Ë¥Á¥§¥Ã¥¯¤·¤è¤¦¤È¤¹¤ëÄøÅÙ¤ò¥³¥ó¥È¥í¡¼¥ë¤·¤Þ¤¹¡£ +¤³¤Î¥â¥¸¥å¡¼¥ë¤¬½èÍýÁ°¤Ë°ì»þ¥Õ¥¡¥¤¥ë¤«°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤ò +°ÂÁ´¤Ë¥Á¥§¥Ã¥¯¤·¤è¤¦¤È¤¹¤ëÄøÅÙ¤òÀ©¸æ¤·¤Þ¤¹¡£ ¥ª¥×¥·¥ç¥ó: =over 8 @@ -967,12 +975,13 @@ =end original -´ðËÜŪ¤Ê¥»¥¥å¥ê¥Æ¥£¤ÎÄøÅ٤ǡ¢°Ê²¼¤Î¤³¤È¤òÊݾڤ·¤Þ¤¹¡£ -¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤·¡¢½ñ¤¹þ¤ß²Äǽ¤Ç¤¢¤ë¤³¤È¡£ -¥Õ¥¡¥¤¥ë¤ò³«¤¯Á°¤Ë¡¢umask() ¤¬¸ÇÄꤵ¤ì¤Æ¤¤¤ë¤³¤È¡£ -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬¡¢¤Þ¤À̵¤±¤ì¤Ð¡¢³«¤«¤ì¤Æ¤ª¤ê¡¢¶¥¹ç¾ò·ï¤¬ +´ðËÜŪ¤Ê¥»¥¥å¥ê¥Æ¥£¤ÎÄøÅ٤ǡ¢°Ê²¼¤Î¤³¤È¤òÊݾڤ·¤Þ¤¹; +¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¸ºß¤·¡¢½ñ¤¹þ¤ß²Äǽ¤Ç¤¢¤ë¤³¤È; +¥Õ¥¡¥¤¥ë¤ò³«¤¯Á°¤Ë¡¢umask() ¤¬¸ÇÄꤵ¤ì¤Æ¤¤¤ë¤³¤È; +°ì»þ¥Õ¥¡¥¤¥ë¤Ï¡¢¤Þ¤À¸ºß¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Î¤ß³«¤¤¤Æ¤¤¤Æ¡¢¶¥¹ç¾ò·ï¤¬ Èò¤±¤é¤ì¤Æ¤¤¤ë¤³¤È¡£ -ºÇ¸å¤Ë¤Ï¡¢L<unlink0|"unlink0"> ´Ø¿ô¤¬»È¤ï¤ì¡¢¥Õ¥¡¥¤¥ë¤ò°ÂÁ´¤Ëºï½ü¤¹¤ë¤³¤È¡£ +ºÇ¸å¤Ë¡¢¥Õ¥¡¥¤¥ë¤ò°ÂÁ´¤Ëºï½ü¤¹¤ë¤¿¤á¤Ë +L<unlink0|"unlink0"> ´Ø¿ô¤¬»È¤ï¤ì¤Þ¤¹¡£ =item MEDIUM @@ -985,8 +994,8 @@ =end original -STANDARD ¤Î°ÂÁ´À¤Ë²Ã¤¨¤Æ¡¢½ÐÎϥǥ£¥ì¥¯¥È¥ê¤¬ root ¤«¡¢ -¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥æ¡¼¥¶¤Î¤É¤Á¤é¤«¤Ë¤è¤Ã¤Æ¡¢ +STANDARD ¤Î°ÂÁ´À¤Ë²Ã¤¨¤Æ¡¢½ÐÎϥǥ£¥ì¥¯¥È¥ê¤¬ root ¤Þ¤¿¤Ï +¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥æ¡¼¥¶¤Î¤É¤Á¤é¤«¤Ë¤è¤Ã¤Æ ½êͤµ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Î¤«¤á¤ë¥Á¥§¥Ã¥¯¤ò¤·¤Þ¤¹¡£ ¥Ç¥£¥ì¥¯¥È¥ê¤¬Â¾¤Î¥°¥ë¡¼¥×¤«¥æ¡¼¥¶¤Ë¤è¤Ã¤Æ½ñ¤¹þ¤ß²Äǽ¤Ç¤¢¤ë¤Ê¤é¤Ð¡¢ ¥¹¥Æ¥£¥Ã¥¡¼¥Ó¥Ã¥È¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Î¤«¤á¤ë¥Á¥§¥Ã¥¯¤ò¤·¤Þ¤¹¡£ @@ -998,8 +1007,8 @@ =end original -¥¹¥Æ¥£¥Ã¥¡¼¥Ó¥Ã¥È¤Î¤¿¤á¤Î¡¢ -C<-k> ¥Æ¥¹¥È¤ò¥µ¥Ý¡¼¥È¤·¤Ê¤¤¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Ï¡¢Æ°¤¤Þ¤»¤ó¡£ +¥¹¥Æ¥£¥Ã¥¡¼¥Ó¥Ã¥È¤Î¤¿¤á¤Î C<-k> ¥Æ¥¹¥È¤ËÂбþ¤·¤Æ¤¤¤Ê¤¤¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Ï +Æ°ºî¤·¤Þ¤»¤ó¡£ =item HIGH @@ -1014,11 +1023,10 @@ =end original -MEDIUM¤Î°ÂÁ´À¥Á¥§¥Ã¥¯¤Ë²Ã¤¨¤Æ¡¢L<POSIX|POSIX> sysconf() ´Ø¿ô¤ò»È¤Ã¤Æ¡¢ +MEDIUM ¤Î°ÂÁ´À¥Á¥§¥Ã¥¯¤Ë²Ã¤¨¤Æ¡¢L<POSIX|POSIX> sysconf() ´Ø¿ô¤ò»È¤Ã¤Æ¡¢ ``chown() giveaway'' ¤Î²ÄǽÀ¤â¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£ -¤â¤·¤³¤ì¤¬²Äǽ¤Ê¤é¡¢¤½¤ì¤¾¤ì¤Î¥Ñ¥¹¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢½çÈ֤ˡ¢ -°ÂÁ´¤ò¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£ -¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤Ç¡¢Á̤äơ¢ºÆµ¢Åª¤Ë¥Á¥§¥Ã¥¯¤·¤Þ¤¹¡£ +¤â¤·¤³¤Î²ÄǽÀ¤¬¤¢¤ì¤Ð¡¢¤½¤ì¤¾¤ì¤Î¥Ñ¥¹¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ +¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤ÇºÆµ¢Åª¤Ë°ÂÁ´À¤¬¥Á¥§¥Ã¥¯¤µ¤ì¤Þ¤¹¡£ =begin original @@ -1029,10 +1037,9 @@ =end original -L<POSIX|POSIX> ¤Î C<_PC_CHOWN_RESTRICTED> ¥·¥ó¥Ü¥ë¤ò¥µ¥Ý¡¼¥È¤·¤Ê¤¤ -¥×¥é¥Ã¥È¥Õ¥©¡¼¥à(¤¿¤È¤¨¤Ð¡¢Windows NT)¤Î¤¿¤á¤Ë¡¢ -¤³¤ì¤Ï¡¢``chown() giveaway'' ¤Ï¡¢²Äǽ¤Ç¤¢¤ê¡¢ºÆµ¢Åª¤Ê¥Æ¥¹¥È¤â¤Ê¤µ¤ì¤ë¤È -²¾Äꤷ¤Þ¤¹¡£ +L<POSIX|POSIX> ¤Î C<_PC_CHOWN_RESTRICTED> ¥·¥ó¥Ü¥ë¤ËÂбþ¤·¤Ê¤¤ +¥×¥é¥Ã¥È¥Õ¥©¡¼¥à(¤¿¤È¤¨¤Ð¡¢Windows NT)¤Ç¤Ï¡¢ +`chown() giveaway'' ¤¬²Äǽ¤Ç¤¢¤ë¤È²¾Äꤷ¡¢ºÆµ¢Åª¤Ê¥Æ¥¹¥È¤¬¹Ô¤ï¤ì¤Þ¤¹¡£ =back @@ -1042,7 +1049,7 @@ =end original -¥ì¥Ù¥ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ¡¢Êѹ¹¤Ç¤¤Þ¤¹: +¥ì¥Ù¥ë¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤·¤ÆÊѹ¹¤Ç¤¤Þ¤¹: File::Temp->safe_level( File::Temp::HIGH ); @@ -1052,7 +1059,7 @@ =end original -¥ì¥Ù¥ëÄê¿ô¤Ï¥â¥¸¥å¡¼¥ë¤Ë¤è¤Ã¤Æ¡¢¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ +¥ì¥Ù¥ëÄê¿ô¤Ï¥â¥¸¥å¡¼¥ë¤Ë¤è¤Ã¤Æ¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ =begin original @@ -1065,10 +1072,10 @@ =end original -MEDIUM ¤«¡¢HIGH ¤Î¥»¥¥å¥ê¥Æ¥£¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Ë¤Ï¡¢ -º£¤Î¤È¤³¤í¡¢¤¹¤¯¤Ê¤¯¤È¤â¡¢Perl v5.6.0 ¤ÇÆ°¤«¤µ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ -¤³¤ì¤Ï¡¢Ã±½ã¤Ë¡¢°ÂÁ´¤Ê¥Æ¥¹¥È¤Ï¡¢v5.6.0 ¤è¤ê¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤Î perl ¤Ç¤Ï¡¢ -ÍøÍѤǤ¤Ê¤¤¡¢<Fcntl|Fcntl> ¤«¤é´Ø¿ô¤ò»È¤¦¤«¤é¤Ç¤¹¡£ +MEDIUM ¤« HIGH ¤Î¥»¥¥å¥ê¥Æ¥£¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Ë¤Ï¡¢ +º£¤Î¤È¤³¤í¾¯¤Ê¤¯¤È¤â Perl v5.6.0 ¤ÇÆ°¤«¤µ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¤³¤ì¤Ïñ½ã¤Ë¡¢°ÂÁ´¤Ê¥Æ¥¹¥È¤Ï v5.6.0 ¤è¤ê¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤Î perl ¤Ç¤Ï +ÍøÍѤǤ¤Ê¤¤ <Fcntl|Fcntl> ¤«¤é´Ø¿ô¤ò»È¤¦¤«¤é¤Ç¤¹¡£ perl 5.6.0 ¤È¡¢5.005_03 ¤Î Fcntl ¤Î¥Ð¡¼¥¸¥ç¥óÈֹ椬¡¢¤½¤ì¤é¤Ï °ã¤¦¤â¤Î¤Ç¤¢¤ë¤Ë¤â¤«¤«¤ï¤é¤º¡¢ ¥Ð¡¼¥¸¥ç¥óÈֹ椬Ʊ¤¸¤Ç¤¢¤ë¤³¤È¤¬ÌäÂê¤Ç¤¹¡£ @@ -1085,11 +1092,12 @@ =end original HIGH ¤È¡¢MEDIUM ¤Î°ÂÁ´¥ì¥Ù¥ë¤ò¥µ¥Ý¡¼¥È¤·¤Ê¤¤ OS(Win NT ¤ä OS/2) ¤Ç¤Ï¡¢ -¤¤¤¯¤é¥ì¥Ù¥ë¤òÊѹ¹¤·¤è¤¦¤È¤·¤Æ¤â¡¢Ìµ»ë¤µ¤ì¤Þ¤¹¡£ -Îã³°¤òµ¯¤³¤¹¤è¤ê¤â¤à¤·¤í¡¢Ìµ»ë¤¹¤ë¤È¸À¤¦·èÄê¤Ë¤è¤ê¡¢ -ÆÃÊ̤ʥƥ¹¥È¤¬Å¬ÀڤǤʤ¤¥·¥¹¥Æ¥à¤Ç¤³¤ì¤é¤Î¥×¥í¥°¥é¥à¤¬¼ºÇÔ¤¹¤ë¤³¤È̵¤·¤Ë¡¢ -¹â¤¤°ÂÁ´À¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤³¤È¤¬½ÐÍè¤ë¥·¥¹¥Æ¥à¤Î¤³¤È¤ò¹Í¤¨¤Æ¡¢ -¹â¤¤¥»¥¥å¥ê¥Æ¥£¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤ò¥Ý¡¼¥¿¥Ö¥ë¤Ë¤·¤Þ¤¹¡£ +¥ì¥Ù¥ë¤òÊѹ¹¤·¤è¤¦¤È¤·¤Æ¤â̵»ë¤µ¤ì¤Þ¤¹¡£ +Îã³°¤òµ¯¤³¤µ¤º¤Ë̵»ë¤¹¤ë¤È¸À¤¦·èÄê¤Ë¤è¤ê¡¢ +°Ü¿¢À¤Î¤¢¤ë¥×¥í¥°¥é¥à¤ò¡¢ +ÄɲäΥƥ¹¥È¤¬Ìµ°ÕÌ£¤Ç¤¢¤ë¥·¥¹¥Æ¥à¤Ç¥×¥í¥°¥é¥à¤¬¼ºÇÔ¤¹¤ë¤È¤¤¤¦¤³¤È¤Ê¤·¤Ë¡¢ +¹â¤¤°ÂÁ´À¤ËÂбþ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¥·¥¹¥Æ¥à¤Î¤³¤È¤ò¹Í¤¨¤Æ¡¢ +¹â¤¤¥»¥¥å¥ê¥Æ¥£¤Ç½ñ¤¯¤³¤È¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£ =begin original @@ -1098,8 +1106,8 @@ =end original -¤â¤·¡¢¼ÂºÝ¤Ë¡¢Êѹ¹¤¬¼õ¤±Æþ¤ì¤é¤ì¤¿¤«¤É¤¦¤«¤ò¸«¤ëɬÍפ¬¤¢¤ë¤Ê¤é¡¢ -ñ¤Ë¡¢C<safe_level> ¤ÎÊÖÃͤò¤òÄ´¤Ù¤Æ¤¯¤À¤µ¤¤¡£ +¤â¤·¡¢¼ÂºÝ¤ËÊѹ¹¤¬¼õ¤±Æþ¤ì¤é¤ì¤¿¤«¤É¤¦¤«¤ò³Îǧ¤¹¤ëɬÍפ¬¤¢¤ë¤Ê¤é¡¢ +ñ¤Ë C<safe_level> ¤ÎÊÖ¤êÃͤò¤òÄ´¤Ù¤Æ¤¯¤À¤µ¤¤¡£ $newlevel = File::Temp->safe_level( File::Temp::HIGH ); die "Could not change to high security" @@ -1116,9 +1124,8 @@ =end original - -¤³¤ì¤Ï¡¢root UID ¤ò»²¾È¤¹¤ë¡¢¸½ºß¤Î¥·¥¹¥Æ¥à¤Ç¤â¤Ã¤È¤â¹â¤¤ UID ¤Ç¤¹¡£ -¤³¤ì¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤¬¡¢Ã±½ã¤Ë root ¤Î¤â¤Î¤Ç¤¢¤ë¤Î¤Ç¤Ï¤Ê¤¯¤Æ¡¢ +¤³¤ì¤Ï root UID ¤ò»²¾È¤¹¤ë¸½ºß¤Î¥·¥¹¥Æ¥à¤Ç¤â¤Ã¤È¤â¹â¤¤ UID ¤Ç¤¹¡£ +¤³¤ì¤Ï°ì»þ¥Ç¥£¥ì¥¯¥È¥ê¤¬Ã±½ã¤Ë root ¤Î¤â¤Î¤Ç¤¢¤ë¤Î¤Ç¤Ï¤Ê¤¯¤Æ¡¢ ¥·¥¹¥Æ¥à UID ¤Î¤â¤Î(C<root>, C<bin>, C<sys> ¤Ê¤É)¤Ç¤¢¤ë¤³¤È¤ò³Î¤«¤á¤ë¤Î¤Ë¡¢ »È¤ï¤ì¤Þ¤¹¡£ @@ -1129,7 +1136,7 @@ =end original -¿¤¯¤Î unix ¤Î¥·¥¹¥Æ¥à¤Ç¡¢C</tmp> ¤Ï¡¢root ¤Î¤â¤Î¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢ +¿¤¯¤Î unix ¤Î¥·¥¹¥Æ¥à¤Ç¡¢C</tmp> ¤Ï root ¤Î¤â¤Î¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢ ¤³¤ì¤¬É¬ÍפȤµ¤ì¤Þ¤¹¡£ =begin original @@ -1139,7 +1146,7 @@ =end original -¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢10 °Ê²¼¤Î¤â¤Î¤Ï¡¢¤É¤ó¤Ê UID ¤â¡¢root UID ¤ÈÁÛÄꤷ¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢10 °Ê²¼¤Î¤â¤Î¤Ï¤É¤ó¤Ê UID ¤â root UID ¤ÈÁÛÄꤷ¤Þ¤¹¡£ File::Temp->top_system_uid(10); my $topid = File::Temp->top_system_uid; @@ -1151,9 +1158,8 @@ =end original -ɬÍפʤé¤Ð¡¢¤³¤ÎÃͤòÄ´À°¤·¤Æ¡¢¥»¥¥å¥ê¥Æ¥£¥Á¥§¥Ã¥¯¤ò²¼¤²¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£ -¤³¤ÎÃͤϡ¢C<safe_level> ¤¬¡¢MEDIUM °Ê¾å¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¡¢ -´ØÏ¢¤¬¤¢¤ê¤Þ¤¹¡£ +ɬÍפʤé¤Ð¤³¤ÎÃͤòÄ´À°¤·¤Æ¥»¥¥å¥ê¥Æ¥£¥Á¥§¥Ã¥¯¤ò²¼¤²¤ë¤³¤È¤â¤Ç¤¤Þ¤¹¡£ +¤³¤ÎÃÍ¤Ï C<safe_level> ¤¬MEDIUM °Ê¾å¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë´ØÏ¢¤¬¤¢¤ê¤Þ¤¹¡£ =back @@ -1172,12 +1178,12 @@ =end original -ºÇ¹â¤Î¥»¥¥å¥ê¥Æ¥£¤Î¤¿¤á¤Ë¤Ï¡¢Â¸ºß¤¹¤ë¥Õ¥¡¥¤¥ë̾¤ò¡¢Ä´¤Ù¤³¤È¡¢ -ºîÀ®¤¹¤ë¤³¤È¡¢ÆþÎϤ¹¤ë¤³¤È¤òÈò¤±¤ë¤è¤¦¤Ë¡¢ÅØÎϤ·¤Æ²¼¤µ¤¤¡£ -¥Õ¥¡¥¤¥ë¥Í¡¼¥à¤¬¡¢»ý¤Ã¤Æ¤¤¤ë¥Ï¥ó¥É¥ë¤ÈƱ¤¸¥Õ¥¡¥¤¥ë¤ËÀܳ¤·¤Æ¤¤¤ë¤³¤È -¤òÃΤê¤Þ¤»¤ó¡£ -¤½¤ì¤Ë¡¢¤½¤ì¤¬¡¢¤è¤ê¿¤¯¤Î¶¥¹ç¾õÂÖ¤ò°ú¤µ¯¤³¤¹¤À¤±¤Ç¤¢¤ë¤³¤È¤ò -¥Á¥§¥Ã¥¯¤·¤è¤¦¤È¤Ï¤Ç¤¤Þ¤»¤ó(ÌõÃð:¡©)¡£ +ºÇ¹â¤Î¥»¥¥å¥ê¥Æ¥£¤Î¤¿¤á¤Ë¤Ï¡¢¤¢¤ë¥Õ¥¡¥¤¥ë¤Î¸ºß¤ò¡¢Ä´¤Ù¤¿¤ê¡¢ +ºîÀ®¤·¤¿¤ê¡¢²¾Äꤷ¤¿¤ê¤¹¤ë¤³¤È¤òÈò¤±¤ë¤è¤¦¤ËÅØÎϤ·¤Æ²¼¤µ¤¤¡£ +¤½¤Î¥Õ¥¡¥¤¥ë̾¤¬¤¢¤Ê¤¿¤Î»ý¤Ã¤Æ¤¤¤ë¥Ï¥ó¥É¥ë¤ÈƱ¤¸¥Õ¥¡¥¤¥ë¤Ë +Àܳ¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ï¤ï¤«¤ê¤Þ¤»¤ó¤·¡¢ +¤½¤ì¤òÄ´¤Ù¤è¤¦¤È¤¹¤ë¤³¤È¤Ï¤è¤ê¿¤¯¤Î¶¥¹ç¾õÂÖ¤ò°ú¤µ¯¤³¤¹¤À¤±¤Ç¤¹¡£ +¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤À¤±¤ò»È¤¤¡¢¥Õ¥¡¥¤¥ë̾¤ÈÀÚ¤êÎ¥¤¹Êý¤¬¤¢¤ë¤«¤Ë°ÂÁ´¤Ç¤¹¡£ =begin original @@ -1189,12 +1195,12 @@ =end original -¥Õ¥¡¥¤¥ë¥Í¡¼¥à¤ò´üÂÔ¤¹¤ë¤â¤Î¤Ë¡¢¥Ï¥ó¥É¥ë¤òÅϤ¹É¬Íפ¬¤¢¤ë¤Ê¤é¡¢ -unix ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢Ç¤°Õ¤Î¥×¥í¥°¥é¥à¤Î¤¿¤á¤Ë¡¢C<"/dev/fd/" . fileno($fh)> ¤ò -»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ -¤Þ¤¿¤Ï¡¢¤è¤ê¡¢°ìÈÌŪ¤Ë¤Ï¡¢Perl ¤Î¥×¥í¥°¥é¥à¤Î¤¿¤á¤Ë¡¢ +¥Õ¥¡¥¤¥ë¥Í¡¼¥à¤ò´üÂÔ¤¹¤ë¤â¤Î¤Ë¥Ï¥ó¥É¥ë¤òÅϤ¹É¬Íפ¬¤¢¤ë¤Ê¤é¡¢ +unix ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢Ç¤°Õ¤Î¥×¥í¥°¥é¥à¤ËÂФ·¤Æ C<"/dev/fd/" . fileno($fh)> ¤ò +»È¤Ã¤Æ¤¯¤À¤µ¤¤; +¤Þ¤¿¤Ï¡¢¤è¤ê°ìÈÌŪ¤Ë Perl ¤Î¥×¥í¥°¥é¥à¤Î¤¿¤á¤Ë C<< "+<=&" . fileno($fh) >> ¤ò»È¤Ã¤Æ²¼¤µ¤¤¡£ -¾¤Î¥×¥í¥»¥¹¤Ë¤½¤ì¤òÅϤ¹Á°¤Ë¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¡¢close-on-exec ¥Ó¥Ã¥È +¾¤Î¥×¥í¥»¥¹¤Ë¤½¤ì¤òÅϤ¹Á°¤Ë¥Õ¥¡¥¤¥ëµ½Ò»Ò¤Ç close-on-exec ¥Ó¥Ã¥È ¤ò¥¯¥ê¥¢¤¹¤ëɬÍפ¬¤¢¤ë¤Ç¤½¤·¤ç¤¦¡£ use Fcntl qw/F_SETFD F_GETFD/; @@ -1203,7 +1209,7 @@ =head2 Temporary files and NFS -(¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤ÈNFS) +(°ì»þ¥Õ¥¡¥¤¥ë¤ÈNFS) =begin original @@ -1216,12 +1222,12 @@ =end original -NFS ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤¢¤ë¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤ò»È¤¦¤³¤È¤Ë´Ø¤·¤Æ¡¢ -¤¤¤¯¤Ä¤«¤ÎÌäÂ꤬¤¢¤ê¡¢½ÐÍè¤ë¸Â¤ê¡¢¥í¡¼¥«¥ë¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»È¤¦¤³¤È¤¬ +NFS ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤¢¤ë°ì»þ¥Õ¥¡¥¤¥ë¤ò»È¤¦¤³¤È¤Ë´Ø¤·¤Æ¤Ï¤¤¤¯¤Ä¤«¤Î +ÌäÂ꤬¤¢¤ê¡¢½ÐÍè¤ë¸Â¤ê¥í¡¼¥«¥ë¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»È¤¦¤³¤È¤¬ ¿ä¾©¤µ¤ì¤Þ¤¹¡£ -¤¤¤¯¤Ä¤«¤Î¥»¥¥å¥ê¥Æ¥£¥Æ¥¹¥È¤Ï¡¢¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤¬¡¢ -¥í¡¼¥«¥ë¤Ë¤Ê¤¤¾ì¹ç¡¢¤Û¤È¤ó¤É¤¿¤¤¤Æ¤¤¡¢¼ºÇÔ¤¹¤ë¤Ç¤·¤ç¤¦¡£ -¹¹¤Ë¡¢NFS ±Û¤·¤Î I/O Áàºî¤Ï¡¢¥í¡¼¥«¥ë¥Ç¥£¥¹¥¯¤ÈÈæ¤Ù¤Æ¡¢Îɤ¯¤Ê¤¤¤³¤È¤Ë +¤¤¤¯¤Ä¤«¤Î¥»¥¥å¥ê¥Æ¥£¥Æ¥¹¥È¤Ï¡¢°ì»þ¥Õ¥¡¥¤¥ë¤¬¥í¡¼¥«¥ë¤Ë¤Ê¤¤¾ì¹ç¡¢ +¤Û¤È¤ó¤É¤¿¤¤¤Æ¤¤¼ºÇÔ¤¹¤ë¤Ç¤·¤ç¤¦¡£ +¹¹¤Ë¡¢NFS ±Û¤·¤Î I/O Áàºî¤Ï¥í¡¼¥«¥ë¥Ç¥£¥¹¥¯¤Û¤ÉÎɤ¯¤Ê¤¤¤³¤È¤Ë µ¤¤ò¤Ä¤±¤Æ²¼¤µ¤¤¡£ =head1 HISTORY @@ -1239,9 +1245,9 @@ =end original ¤â¤È¤â¤È¤Ï¡¢1999 ǯ¤Î 5 ·î¤Ë¥·¥¹¥Æ¥à¤Î mkstemp() ´Ø¿ô¤Ø¤Î -XS ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤È¤·¤Æ¡¢Ëä¤Þ¤ì¤Þ¤·¤¿¡£ -2000 ǯ 5 ·î¤Ë¡¢OpenBSD ¤Î mkstemp() ¥³¡¼¥É¤¬¡¢¥³¡¼¥É¤Î¥»¥¥å¥ê¥Æ¥£¥Á¥§¥Ã¥¯¤ò -¥È¡¼¥¿¥ë¤Ë¡¢¥³¥ó¥È¥í¡¼¥ë¤¹¤ë¤¿¤á¤Ë¡¢Perl ¤Ë°Ü¿¢¤µ¤ì¤Þ¤·¤¿¡£ +XS ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤È¤·¤ÆÀ¸¤Þ¤ì¤Þ¤·¤¿¡£ +2000 ǯ 5 ·î¤Ë¡¢¥³¡¼¥É¤Î¥»¥¥å¥ê¥Æ¥£¥Á¥§¥Ã¥¯¤ò´°Á´¤ËÀ©¸æ¤¹¤ë¤¿¤á¤Ë¡¢ +OpenBSD ¤Î mkstemp() ¥³¡¼¥É¤¬ Perl ¤Ë°Ü¿¢¤µ¤ì¤Þ¤·¤¿; ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë°Í¸¤·¤Ê¤¤´Ø¿ô¤Î¸ºß¤òÊݾڤ¹¤ë¤³¤È¤Ë¤Ê¤ê¡¢ °Ü¿¢À¤ò½õ¤±¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ @@ -1256,8 +1262,8 @@ =end original -¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤ò°·¤¦°ã¤Ã¤¿¼ÂÁõ¤Î¡¢L<IO::File>¤È¡¢L<File::MkTemp> ¤â -¸«¤Æ¤¯¤À¤µ¤¤¡£ +°ì»þ¥Õ¥¡¥¤¥ë¤ò°·¤¦°Û¤Ê¤Ã¤¿¼ÂÁõ¤Ë¤Ä¤¤¤Æ¤Ï L<IO::File> ¤È L<File::MkTemp> ¤ò +»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ =head1 AUTHOR @@ -1273,3 +1279,9 @@ should be written and providing ideas for code improvements and security enhancements. +=begin meta + +Update: SHIRAKATA Kentaro <argra****@ub32*****> (0.12-) +Status: completed + +=end meta