# HG changeset patch # User Edouard Tisserant # Date 1627552768 -7200 # Node ID d2b0c768755d7f486dc8588bdcbd3a701215b133 # Parent ef04cedee08b1ab58bf7a760d77cdfcc2bb9a31c Runtime: Better handling of nested strings in spawn_subprocess commandline parsing diff -r ef04cedee08b -r d2b0c768755d runtime/spawn_subprocess.py --- a/runtime/spawn_subprocess.py Thu Jul 29 08:25:26 2021 +0200 +++ b/runtime/spawn_subprocess.py Thu Jul 29 11:59:28 2021 +0200 @@ -7,6 +7,7 @@ from __future__ import absolute_import import os import signal +import shlex import posix_spawn PIPE = "42" @@ -104,9 +105,9 @@ cmd = [] if isinstance(args[0], str): if len(args) == 1: - # oversimplified splitting of arguments, - # TODO: care about use of simple and double quotes - cmd = args[0].split() + # splitting of arguments that cares about + # use of simple and double quotes + cmd = shlex.split(args[0]) else: cmd = args elif isinstance(args[0], list) and len(args) == 1: