Hi,

I am writing some automation to control monetdbd programmatically from Python. While the rest of the monetdbd commands work fine, the command:

monetdbd start <farm>

never returns control to Python. I have tried this on both CPython 2.7 and PyPy 2.0.4.

cnelson@hpvm:~/workspace/cql-db-py/cql $ python store.py
DEBUG:root:'/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd set passphrase=letmein /tmp/test_warehouse'
DEBUG:root:'/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd set control=yes /tmp/test_warehouse'
DEBUG:root:'/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd set discovery=yes /tmp/test_warehouse'
DEBUG:root:'/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd set port=60000 /tmp/test_warehouse'
INFO:root:Starting warehouse at '/tmp/test_warehouse'

cnelson@hpvm:~/workspace/cql-db-py/cql $ ps a
  PID TTY      STAT   TIME COMMAND
31608 pts/3    S      0:00 python store.py
31613 pts/3    Z      0:00 [monetdbd] <defunct>

You can see that the process appears to have finished, but never returns control to Python. If I run the 'stop' command from the prompt, everything clears up and finishes:

cnelson@hpvm:~/workspace/cql-db-py/cql $ /home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd stop /tmp/test_warehouse
cnelson@hpvm:~/workspace/cql-db-py/cql $ DEBUG:root:'/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd start /tmp/test_warehouse'
INFO:root:Stopping warehouse at '/tmp/test_warehouse'
ERROR:root:Unable to run command: '/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd stop /tmp/test_warehouse'
DEBUG:root:unable to open merovingian.pid: No such file or directory

ERROR:root:None
Traceback (most recent call last):
  File "store.py", line 198, in <module>
    w.stop()
  File "store.py", line 192, in stop
    self._control_warehouse("stop")
  File "store.py", line 98, in _control_warehouse
    raise subprocess.CalledProcessError(p.returncode, cmd, out)
subprocess.CalledProcessError: Command '['/home/cnelson/workspace/cql-db-py/cql/storage_engine/bin/monetdbd', 'stop', '/tmp/test_warehouse']' returned non-zero exit status 1

The error here occurs because the next thing that the script will try to do is 'stop' the monetdbd instance. Which of course I already did by hand. The point is that once I stop the monetdbd instance OOB, the original monetdbd where 'start' was called finally does return control to Python. Which indicates that it is probably not a Python problem.

Any ideas?