spaces in paths confuse the zopectl startup script

Bug #163879 reported by Martijn Faassen
4
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zc.zope3recipes
Confirmed
Undecided
Unassigned

Bug Description

Using zc.zope3recipes, if I place a Zope 3 buildout in a directory where one of the parents has a space in it, such as

/tmp/spaces in path/mybuildout

the zopectl script gets confused. On linux I get the following output:

/home/faassen/tmp/spaces in/store-071116/parts/app/runzope -C /home/faassen/tmp/spaces in/store-071116/parts/zopectl/zope.conf

i.e. as normal, but then nothing happens. The system returns to the next command prompt immediately.

On Windows, the following error occurs:

Error: positional arguments are not supported
For help, use C:\[elided]\runzope-script.py - h
Zope 3 started int he foreground: [elided]\runzope -C [elided]\parts\zopectl\zope.conf

It looks like some shell escaping isn't taking place where it should be?

Revision history for this message
Christophe Combelles (ccomb) wrote :

This happens also with the standard zope 3.3.1 distribution

Revision history for this message
Christophe Combelles (ccomb) wrote :

The problem is the following:

In the <runner> section, zdaemon.conf defines a 'program' parameter that looks like this:
/some/path/with spaces/runzope -C /some/path/with spaces/zope.conf

This line is splitted into 5 separate strings, and started by zdaemon/zdctl.py with:
os.spawnlp(os.P_WAIT, program[0], *program)
or
os.spawnvp(flag, args[0], args)

But args[0] is "/some/path/with" instead of "/some/path/with spaces/runzope"

There is no problem with other parameters such as 'directory' or 'transcript' because they are treated as single entities and are not tried to be splitted. The 'program' parameter is composed of 3 items but splitted in 5.

Changed in zope3:
status: New → Confirmed
Changed in zc.zope3recipes:
status: New → Confirmed
Changed in zope3:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.