diff options
author | André Draszik <git@andred.net> | 2020-02-03 17:28:12 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-04 15:56:29 +0000 |
commit | e4893d48300ea6a3e172e046f83f3d4c54e95786 (patch) | |
tree | 6f92b9867834d02ebc1a1af143ab4e9d0ff8dc38 /meta/lib/oeqa/controllers | |
parent | 3161eecefcbd0eb4373520f9719353fec5fada93 (diff) | |
download | poky-e4893d48300ea6a3e172e046f83f3d4c54e95786.tar.gz |
oeqa: modernise subprocess: preexec_fn=os.setsid -> start_new_session=True
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.
(From OE-Core rev: c3bd502f31a621394a2f6ea3ae90443ff4ac98a4)
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/controllers')
-rw-r--r-- | meta/lib/oeqa/controllers/masterimage.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
97 | if self.powercontrol_cmd: | 97 | if self.powercontrol_cmd: |
98 | cmd = "%s %s" % (self.powercontrol_cmd, msg) | 98 | cmd = "%s %s" % (self.powercontrol_cmd, msg) |
99 | try: | 99 | try: |
100 | commands.runCmd(cmd, assert_error=False, preexec_fn=os.setsid, env=self.origenv) | 100 | commands.runCmd(cmd, assert_error=False, start_new_session=True, env=self.origenv) |
101 | except CommandError as e: | 101 | except CommandError as e: |
102 | bb.fatal(str(e)) | 102 | bb.fatal(str(e)) |
103 | 103 | ||