commit:     8e47286b7082aac21fe25402a1f9d03db968cd30
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 06:58:10 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 06:59:17 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8e47286b

Revert "pid-ns-init: Carry the autogroup's nice value into the new session"

This reverts commit 209be9a8bee13384dd04a4762436b4c2a5e35bc6
due to another regression.

Reported-by: Joonas Niilola <juippis <AT> gentoo.org>
Bug: https://bugs.gentoo.org/777492
Bug: https://bugs.gentoo.org/785484
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/pid-ns-init | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/bin/pid-ns-init b/bin/pid-ns-init
index c8e82bdb7..e410dd028 100644
--- a/bin/pid-ns-init
+++ b/bin/pid-ns-init
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# Copyright 2018-2021 Gentoo Authors
+# Copyright 2018-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import errno
@@ -12,7 +12,6 @@ import subprocess
 import sys
 import termios
 
-from pathlib import Path
 
 KILL_SIGNALS = (
        signal.SIGINT,
@@ -92,28 +91,9 @@ def main(argv):
                        'preexec_fn': functools.partial(preexec_fn, uid, gid, 
groups, umask),
                        'pass_fds': pass_fds,
                }
-
-               # Try to obtain the current autogroup's nice value.
-               autogroup_nice = None
-               autogroup_file = Path("/proc/self/autogroup")
-               try:
-                       f = autogroup_file.open("r")
-               except EnvironmentError:
-                       pass
-               else:
-                       with f:
-                               line = f.readline()
-                               autogroup_nice = line.split(" ")[2]
-
                # Isolate parent process from process group SIGSTOP (bug 675870)
                setsid = True
                os.setsid()
-
-               if autogroup_nice:
-                       # Set the previously obtained autogroup nice value 
again,
-                       # since we created a new session with os.setsid() above.
-                       autogroup_file.write_text(autogroup_nice)
-
                if sys.stdout.isatty():
                        try:
                                fcntl.ioctl(sys.stdout, termios.TIOCSCTTY, 0)

Reply via email to