Wireshark-dev: Re: [Wireshark-dev] Python error: "execvp: bad file number"
From: "Graham Bloice" <[email protected]>
Date: Fri, 17 Feb 2012 17:59:45 -0000
> I hit a problem with the Python generation of epan/dissectors/register.c.
> The message from my python (v. 2.7.2) at this stage was:
>  .. "execvp: python: Bad file number"
> after reading the docs on '_execvp' [1] at MSDN, I suspect this error is
> to the very long command-line given to python to generate the file
> register.c. The MSDN article specifies that the size of the command- line
> *and* the environment cannot exceed 32 Kbytes. This seems to be the case
> here. My environment size is (when python starts), almost 12 kB.
> And the size of the command-line here is approx. 32kB.
> Hence, if I understand this correctly, the 'errno' value (inside python's
CRT or
> the CRT it uses) is set to 'E2BIG'. And 'strerror(E2BIG)' maps to "bad
> number".
> But I fail to see which C-runtime returns this specific text. A quick test
> that my MSVCRT.DLL, MSVCR90.DLL etc. (and all previous versions) has a
> 'strerror(E2BIG)'
> that returns "arg list too long". So is it possible that my python uses
> 'strerror()'
> or uses a custom version?. I'm confused.
> A fix for me is to disable use of Python for this. I.e. comment away
> in config.nmake. Has anyone else seen a problem like this?
> I use python version 2.7.2 in Win-XP SP3.
> [1] http://msdn.microsoft.com/en-us/library/3xw6zy53.aspx

I built on the same platform just a few minutes ago (from trunk r41048)  and
register.c was fine.  I'm using python 2.7.1 though.  How are you
determining your environment size?