Possible solution to the Windows AtomicParsley crashes?
dinkypumpkin
dinkypumpkin at gmail.com
Mon Oct 10 07:06:03 EDT 2011
On 09/10/2011 22:36, dinkypumpkin wrote:
> On 09/10/2011 08:39, Vangelis forthnet wrote:
>> it has pid=p00kdr09. With the workaround suggested, AP (latest binary)
>> tags the m4a file, but only
>> PARTIALLY: The "Comment" and "©lyr" fields (in MediaInfo) contain only
>> the first word of the
>> description, i.e. "Were" (???).
>
> Windows, naturally. I think what's happening is that Perl sees the
> embedded double quotes as shell metacharacters and hands off
> AtomicParsley execution to the Windows shell (cmd.exe). In that case,
OK, I should have had another cup of coffee before writing that. It
doesn't really make sense in the light of day. I dug into IPC::Open3 a
bit, and this is what I think is happening:
The AP command is invoked via the array form of open3(), which
eventually calls system(1,...) to launch AP in a detached subprocess.
It dawned on me that this presumably employs the Win32 CreateProcess()
function, which means that Microsoft C/C++ parameter parsing rules come
into play. They are slightly different from Windows shell rules, but
the effect is the same: parameters with embedded double quotes must be
enclosed in double quotes and the embedded double quotes must be escaped.
So, the choice is the same: Special handing for embedded quotes in
Windows or the brute force approach of converting all double quotes to
single quotes on all platforms. I was leaning towards the latter, but
on second thought that seems unnecessarily obstinate.
More information about the get_iplayer
mailing list