On Fri May 29 14:27:29 2009, RJBS wrote:
Show quoted text> Sometimes when there is forking or other stuff going on, calling
> File::MMagic->new will try reading the code of the library instead of
> the DATA section. Re-seeking DATA is often a big pain.
>
> I fixed my local copy by patching to cache the contents of the data
section.
Attached a script which may (sometimes) reproduce the problem. The
"good" case produces output like
image/gif at /tmp/fmmagic.pl line 12.
47567 at /tmp/fmmagic.pl line 13, <DATA> line 296.
image/gif at /tmp/fmmagic.pl line 16.
47567 at /tmp/fmmagic.pl line 17, <DATA> line 296.
But sometimes it's
image/gif at /tmp/fmmagic.pl line 12.
47567 at /tmp/fmmagic.pl line 13, <DATA> line 296.
application/octet-stream at /tmp/fmmagic.pl line 16.
48572 at /tmp/fmmagic.pl line 17, <DATA> line 349.
or even
Bad Offset/Type at line 132. '------
'
application/octet-stream at /tmp/fmmagic.pl line 16.
image/gif at /tmp/fmmagic.pl line 12.
47567 at /tmp/fmmagic.pl line 13, <DATA> line 296.
45879 at /tmp/fmmagic.pl line 17, <DATA> line 270.
Regards,
Slaven