From c3bd502f31a621394a2f6ea3ae90443ff4ac98a4 Mon Sep 17 00:00:00 2001 From: André Draszik Date: Mon, 3 Feb 2020 17:28:12 +0000 Subject: oeqa: modernise subprocess: preexec_fn=os.setsid -> start_new_session=True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit start_new_session was added to python3 subprocess in v3.2 and is meant to take the place of the common use of preexec_fn to call os.setsid() in the child - as done here. Update to use the new equivalent. Signed-off-by: André Draszik Signed-off-by: Richard Purdie --- meta/lib/oeqa/controllers/masterimage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/lib/oeqa/controllers') diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py index 0435dfa125..0bf5917e48 100644 --- a/meta/lib/oeqa/controllers/masterimage.py +++ b/meta/lib/oeqa/controllers/masterimage.py @@ -97,7 +97,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta if self.powercontrol_cmd: cmd = "%s %s" % (self.powercontrol_cmd, msg) try: - commands.runCmd(cmd, assert_error=False, preexec_fn=os.setsid, env=self.origenv) + commands.runCmd(cmd, assert_error=False, start_new_session=True, env=self.origenv) except CommandError as e: bb.fatal(str(e)) -- cgit 1.2.3-korg