Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2.7': 0.04; '2.2': 0.05; 'bug.': 0.07; 'everybody,': 0.07; 'python': 0.08; 'correct.': 0.09; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'lines:': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'runtime': 0.09; 'skip:\\ 10': 0.09; 'subject:access': 0.09; 'library': 0.15; 'argument': 0.15; '*can*': 0.16; '[errno': 0.16; 'boils': 0.16; 'bugfixes.': 0.16; 'codebase': 0.16; 'fine;': 0.16; 'fixes.': 0.16; 'ioerror': 0.16; 'needless': 0.16; 'oserror:': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:issues': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; '2.x': 0.18; 'say,': 0.19; 'cc:no real name:2**0': 0.20; 'result.': 0.21; 'maybe': 0.21; 'cc:2**0': 0.22; 'assume': 0.22; 'header:In-Reply-To:1': 0.22; '(on': 0.23; 'concise': 0.23; 'happen.': 0.23; 'checked': 0.24; "python's": 0.24; 'code': 0.25; 'fine': 0.26; 'tried': 0.26; "i'm": 0.27; 'code,': 0.28; 'seeing': 0.28; 'bugs': 0.28; 'invalid': 0.28; 'problem': 0.28; 'import': 0.28; 'cc:addr:python.org': 0.30; 'lines': 0.30; 'ran': 0.30; 'tjg': 0.30; 'error.': 0.32; "i've": 0.34; "i'll": 0.34; 'header :User-Agent:1': 0.34; 'checking': 0.34; 'see,': 0.34; 'pretty': 0.35; 'running': 0.35; 'trouble': 0.35; 'anything': 0.36; 'problem.': 0.36; 'file': 0.36; 'run': 0.37; 'several': 0.37; 'but': 0.37; 'open': 0.37; 'overview': 0.38; 'returning': 0.38; 'some': 0.38; 'skip:o 20': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'under': 0.39; 'getting': 0.39; 'subject:with': 0.39; "it's": 0.40; 'your': 0.61; 'kind': 0.61; 'from:addr:mail': 0.64; 'rights': 0.68; 'urgent': 0.72; 'hard!': 0.84; 'notepad,': 0.84; 'xp,': 0.84; 'handing': 0.91; 'to:none': 0.93; 'family.': 0.96 Date: Mon, 24 Oct 2011 14:18:27 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: spawnl issues with Win 7 access rights References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1319462400 news.xs4all.nl 6862 [2001:888:2000:d::a6]:45244 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:14917 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): import os os.spawnl (os.P_NOWAIT, r"c:\windows\notepad.exe") 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