On Mon, 16 Nov 2009, Johan Almqvist wrote:
On 16. nov. 2009, at 22.18, Charlie Brady wrote:
On Mon, 16 Nov 2009, Hinrik Örn Sigurðsson wrote:
On Mon, Nov 16, 2009 at 7:54 PM, Charlie Brady
<charlieb-qpsm...@budge.apana.org.au> wrote:
9566 Â open("/tmp/PerlIO_tQARsp", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) =
-1 EACCES (Permission denied)
Maybe your user can't access /tmp for some reason?
Yes, that is true, and has been confirmed and corrected, but I'm still
concerned about the inaccurate errstring ("Invalid argument") from
perl.
I don't think that's from perl, but from Mime::Parser
The $! is supplied by perl. The code from Mime::Parser is here:
...
$io = tmpopen() or die "$ME: can't open tmpfile: $!\n";
...
I wonder if something is localising $!, so we are getting a wrong, old
errno.
tmpopen is MIME::Tools::tmpopen:
...
sub tmpopen {
&$Tmpopen();
}
$Tmpopen = sub { IO::File->new_tmpfile; };
...
And then the trail grows cold (for me) - new_tmpfile is implemented in XS
code, I think. I think something is not handling errno correctly in the
error paths.
-bash-3.00$ grep -r new_tmpfile /usr/lib/perl5/5.8.5/
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/POSIX.pod:Use method
C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/IO/File.pm:=item new_tmpfile
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/POSIX.pm: redef
"IO::File::new_tmpfile()";
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/B.pm: $output_fh ||=
FileHandle->new_tmpfile;
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/POSIX/tmpfile.al: redef
"IO::File::new_tmpfile()";
Binary file /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/IO/IO.so matches
/usr/lib/perl5/5.8.5/pod/perl58delta.pod:IO::File::new_tmpfile() is no longer
limited to 32767 invocations
/usr/lib/perl5/5.8.5/pod/perlfaq5.pod:don't have a modern enough Perl installed, use
the C<new_tmpfile>
/usr/lib/perl5/5.8.5/pod/perlfaq5.pod: $fh = IO::File->new_tmpfile()
/usr/lib/perl5/5.8.5/pod/perltoc.pod:new ( FILENAME [,MODE [,PERMS]] ),
new_tmpfile
/usr/lib/perl5/5.8.5/pod/perltoc.pod:new ( FILENAME [,MODE [,PERMS]] ),
new_tmpfile
/usr/lib/perl5/5.8.5/FileHandle.pm: [qw(new new_tmpfile open)]
-bash-3.00$
http://code.softwarefreedom.org/projects/stet/browser/external/MIME-tools/5.419/lib/MIME/Parser.pm#L1689
-Johan