t.i.utils._callProtocolWithDeferred passes full executable path as first argument

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from ivank <[email protected]>:

One of my Windows processes was having strange crashes. I narrowed it down to Twisted setting the full path as the first argument.

`twisted/internet/utils.py` `_callProtocolWithDeferred` looks like this:

{{{
#!python
def _callProtocolWithDeferred(protocol, executable, args, env, path, reactor=None):
    if reactor is None:
        from twisted.internet import reactor

    d = defer.Deferred()
    p = protocol(d)
    reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
    return d
}}}

but

{{{
reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
}}}

should probably be

{{{
reactor.spawnProcess(p, executable, (os.path.split(executable)[1],)+tuple(args), env, path)
}}}

because `getProcessOutput` gives `_callProtocolWithDeferred` the full executable path.

----------
Type     : defect
Component: core
Keywords : windows
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3815
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.