1 |
commit: 8e47286b7082aac21fe25402a1f9d03db968cd30 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 06:58:10 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 06:59:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8e47286b |
7 |
|
8 |
Revert "pid-ns-init: Carry the autogroup's nice value into the new session" |
9 |
|
10 |
This reverts commit 209be9a8bee13384dd04a4762436b4c2a5e35bc6 |
11 |
due to another regression. |
12 |
|
13 |
Reported-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
Bug: https://bugs.gentoo.org/777492 |
15 |
Bug: https://bugs.gentoo.org/785484 |
16 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
17 |
|
18 |
bin/pid-ns-init | 22 +--------------------- |
19 |
1 file changed, 1 insertion(+), 21 deletions(-) |
20 |
|
21 |
diff --git a/bin/pid-ns-init b/bin/pid-ns-init |
22 |
index c8e82bdb7..e410dd028 100644 |
23 |
--- a/bin/pid-ns-init |
24 |
+++ b/bin/pid-ns-init |
25 |
@@ -1,5 +1,5 @@ |
26 |
#!/usr/bin/env python |
27 |
-# Copyright 2018-2021 Gentoo Authors |
28 |
+# Copyright 2018-2020 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
import errno |
32 |
@@ -12,7 +12,6 @@ import subprocess |
33 |
import sys |
34 |
import termios |
35 |
|
36 |
-from pathlib import Path |
37 |
|
38 |
KILL_SIGNALS = ( |
39 |
signal.SIGINT, |
40 |
@@ -92,28 +91,9 @@ def main(argv): |
41 |
'preexec_fn': functools.partial(preexec_fn, uid, gid, groups, umask), |
42 |
'pass_fds': pass_fds, |
43 |
} |
44 |
- |
45 |
- # Try to obtain the current autogroup's nice value. |
46 |
- autogroup_nice = None |
47 |
- autogroup_file = Path("/proc/self/autogroup") |
48 |
- try: |
49 |
- f = autogroup_file.open("r") |
50 |
- except EnvironmentError: |
51 |
- pass |
52 |
- else: |
53 |
- with f: |
54 |
- line = f.readline() |
55 |
- autogroup_nice = line.split(" ")[2] |
56 |
- |
57 |
# Isolate parent process from process group SIGSTOP (bug 675870) |
58 |
setsid = True |
59 |
os.setsid() |
60 |
- |
61 |
- if autogroup_nice: |
62 |
- # Set the previously obtained autogroup nice value again, |
63 |
- # since we created a new session with os.setsid() above. |
64 |
- autogroup_file.write_text(autogroup_nice) |
65 |
- |
66 |
if sys.stdout.isatty(): |
67 |
try: |
68 |
fcntl.ioctl(sys.stdout, termios.TIOCSCTTY, 0) |