spawnl issues with Win 7 access rights

Tim Golden mail at timgolden.me.uk
Mon Oct 24 09:18:27 EDT 2011


On 24/10/2011 13:43, Propad wrote:
> Hello everybody,
> I have some trouble with a program I run both on a WinXP and on Win 7.
> It boils down to this several lines:
>
> import os
> vePath = r'C:\Programme\RA Consulting_Webservices\DiagRA-MCD
> \DiagRA_D.exe'
> #vePath = r'C:\Windows\notepad.exe'
> process_id = os.spawnl(os.P_NOWAIT, vePath)
>
> Under Win XP they  open DiagRA just fine; under Win 7 I'm getting:
> OSError: [Errno 22] Invalid argument
> Needless to say, I checked the path under Win 7; it is correct.
>
> As you can see, I tried the same lines with notepad, just in case;
> same result. Works fine under XP, IOError under Win 7.
>
> So I'm pretty sure it's some kind of Win 7 access rights issue... Can
> anybody point me to a concise overview of the issues involved, and
> maybe even the known solutions? Again, it's os.spawnl in Python 2.2,
> under Win 7.

That's impressive. I ran this (on Python 2.7 on Win7):

<code>
import os

os.spawnl (os.P_NOWAIT, r"c:\windows\notepad.exe")

</code>

and Python crashed hard! Long time since I've seen that happen.

This may or may not be related to what you're seeing but it's
definitely a problem. I'll check the bugs database and/or
file a bug.

I *can* reproduce your problem running Python22 on Win7. Now,
no-one's going to be applying patches to Python 2.2 at this
stage: in the 2.x series, only 2.7 is getting anything other
than urgent security fixes. And even 2.7's only getting clear
bugfixes. Just so you know.

Without checking the code, I'm going to assume that the 2.2 codebase
is handing off to the MS C Runtime Library for posix-related calls
such as the spawn* family. So it may not even be Python's code directly
which is returning this error.


TJG



More information about the Python-list mailing list