From a50c74523f903c12618d130b6017774d4624b04f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 8 Feb 2015 12:18:57 +0800 Subject: [PATCH] ctlmgr: split command arguments properly --- artiq/frontend/artiq_ctlmgr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_ctlmgr.py b/artiq/frontend/artiq_ctlmgr.py index cc397aef7..966fa5a74 100755 --- a/artiq/frontend/artiq_ctlmgr.py +++ b/artiq/frontend/artiq_ctlmgr.py @@ -5,6 +5,7 @@ import argparse import os import logging import signal +import shlex from artiq.protocols.sync_struct import Subscriber from artiq.tools import verbosity_args, init_logger @@ -48,7 +49,8 @@ class Controller: logger.info("Starting controller %s with command: %s", name, command) try: - process = yield from asyncio.create_subprocess_exec(*command.split()) + process = yield from asyncio.create_subprocess_exec( + *shlex.split(command)) yield from asyncio.shield(process.wait()) except FileNotFoundError: logger.warning("Controller %s failed to start", name)