.#,*ü" 10 $ base+ü" 12 1 Jed_Tmp_Directory $ NULLBýü" 13 $ baseþ 0 path_is_absolute! 0AC.ýü" 14 1 Jed_Tmp_Directory $ baseþ + path_concat°$ base/cýü" 16 $ baseþ 1 path_sans_extname°$ baseýü" 18" -1! 0þ & randomP*ü" 19 # pid+ & getpid°# pidü" 21$ 1000 .*ü" 23 $ file+ý' %s%d.%d $ baseý! 0% 32767þ & random # pidþ ' sprintf°$ fileýü" 24 $ fileþ + file_status. $ filew/b/iýü" 26< Unable to create a tmp file!þ % errorü" 10y- make_tmp_file,*ü" 55 $ base # ext+ü" 57 1 Jed_Tmp_Directory $ NULLB.ü" 58! 0ý $ baseþ 0 path_is_absoluteA/6.ýü" 59 1 Jed_Tmp_Directory $ baseþ + path_concat°$ base/c*ü" 61 # dir+ý $ baseþ , path_dirname°# dirü" 62 # dir! .B.ü" 63! 2ý # dirþ + file_statusB/6.ýü" 64 ' IOErrorE tmpfile directory $dir does not exist‰/cýü" 66" -1! 0þ & randomP*ü" 68 # fmt+& %s%X%s°# fmtü" 69 # ext $ NULLA.ü" 70 °# ext/.ýü" 71! 0 # ext!" 46B.ü" 72! . # ext9°# ext/c/d*ü" 74 % flags+ & O_RDWR ' O_CREATJ & O_EXCLJ°% flags*ü" 75 $ mode+ ' S_IRUSR ' S_IWUSRJ°$ modeü" 77$ 5000.*ü" 79 # err+*ü" 81 $ file+ý # fmt $ baseý! 0* 2147483647þ & random # extþ ' sprintf°$ file*ü" 82 " fd+ý $ file % flags $ modeþ $ open°" fdü" 83 " fd $ NULLB.*ü" 85 " fp+ý " fd" r+þ & fdopen°" fpü" 86 " fp $ NULLA.ü" 88 , errno_string°# errýü" 89 " fdþ % closePýü" 90 $ fi leþ & removePýü" 91 ' IOError3 fdopen failed: $err‰/cü" 95 $ file$ file " fp" fp " fd" fd$ file" fp" fd! 3! 3Žw/cü" 99 % errno & EEXISTB. % errno % EINTRB/6.ü# 101 , errno_string°# errýü# 102 ' IOError1 open failed: $err‰/c/iýü# 106 ' IOError< Unable to open a unique file‰ü" 55y4 open_unique_filename