forked from M-Labs/artiq
ctlmgr: split command arguments properly
This commit is contained in:
parent
abb7d9f911
commit
a50c74523f
|
@ -5,6 +5,7 @@ import argparse
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import signal
|
import signal
|
||||||
|
import shlex
|
||||||
|
|
||||||
from artiq.protocols.sync_struct import Subscriber
|
from artiq.protocols.sync_struct import Subscriber
|
||||||
from artiq.tools import verbosity_args, init_logger
|
from artiq.tools import verbosity_args, init_logger
|
||||||
|
@ -48,7 +49,8 @@ class Controller:
|
||||||
logger.info("Starting controller %s with command: %s",
|
logger.info("Starting controller %s with command: %s",
|
||||||
name, command)
|
name, command)
|
||||||
try:
|
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())
|
yield from asyncio.shield(process.wait())
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.warning("Controller %s failed to start", name)
|
logger.warning("Controller %s failed to start", name)
|
||||||
|
|
Loading…
Reference in New Issue