Skip to content

Commit adb0af3

Browse files
authored
Merge pull request #676 from amoffat/develop
2.0.4 release
2 parents 4ecfd8a + db126f2 commit adb0af3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

3-
## 2.0.2 - 2/13/22
3+
## 2.0.4 - 5/13/22
4+
5+
- Allow `ok_code` to be used with `fg` [#655](https://github.com/amoffat/sh/pull/655)
6+
- Make sure `new_group` never creates a new session [#675](https://github.com/amoffat/sh/pull/675)
7+
8+
## 2.0.2 / 2.0.3 (misversioned) - 2/13/22
49

510
- Performance regression when using a generator with `_in` [#650](https://github.com/amoffat/sh/pull/650)
611
- Adding test support for python 3.11

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "sh"
3-
version = "2.0.3"
3+
version = "2.0.4"
44
description = "Python subprocess replacement"
55
authors = ["Andrew Moffat <arwmoffat@gmail.com>"]
66
readme = "README.rst"

sh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def fg_validator(passed_kwargs, merged_kwargs):
11161116
_fg is invalid with nearly every other option, see warning and workaround here:
11171117
11181118
https://amoffat.github.io/sh/sections/special_arguments.html#fg"""
1119-
allowlist = {"env", "fg", "cwd"}
1119+
allowlist = {"env", "fg", "cwd", "ok_code"}
11201120
offending = set(passed_kwargs.keys()) - allowlist
11211121

11221122
if "fg" in passed_kwargs and passed_kwargs["fg"] and offending:
@@ -2037,7 +2037,7 @@ def __init__(
20372037
if new_session:
20382038
os.setsid()
20392039
elif new_group:
2040-
os.setpgrp()
2040+
os.setpgid(0, 0)
20412041

20422042
sid = os.getsid(0)
20432043
pgid = os.getpgid(0)

0 commit comments

Comments
 (0)