[PATCH 00/22] Do not modify the global environment after starting threads

David Shea dshea at redhat.com
Wed Jun 3 16:03:24 UTC 2015


These are the patches from master to avoid modifying os.environ, since this is
unsafe in a multi-threaded program. Since those changes depend on all child
processes being started more or less the same way in order to export new
environment variables, this also includes the changes to start all child
processes with iutil methods.

The patches are based on clumen's last set of patches for tests in the hopes
that I won't run over those too badly.

David Shea (20):
  Lock program_log_lock closer to where the log is written.
  Add a method startProgram to handle process starting
  Add an option to startProgram to reset signal handlers.
  Add close_fds to the Popen call.
  Simplify iutil.execReadlines.
  Add an option to only capture stdout with execWithCapture
  Close file descriptors while daemonizing auditd
  Move process watching to iutil.
  Move the X startup logic to iutil
  Always use iutil to start processes.
  Handle the simple cases of environment modification.
  Set $DISPLAY before threads are started.
  Add a method to set environment variables for child processes
  Add a parameter to iutil.startProgram to extend the environment
  Avoid setting $LANG and $LANGUAGE, except where we can't
  Remove timestamp-based version support.
  Do not set $TZ
  Assume UTC if setting the system time without a timezone
  Set $LIBUSER_CONF early
  Add an option to startProgram to not reset the locale

Vratislav Podzimek (2):
  Fix the last member of the struct_time struct
  Beware of 0 being the same bool value as None when setting time

 anaconda                                   | 257 ++++---------------
 pyanaconda/anaconda_log.py                 |   4 +-
 pyanaconda/constants.py                    |   3 +
 pyanaconda/ihelp.py                        |   4 +-
 pyanaconda/isys/__init__.py                |  36 +--
 pyanaconda/isys/auditd.c                   |   5 +
 pyanaconda/iutil.py                        | 392 ++++++++++++++++++++++-------
 pyanaconda/kickstart.py                    |  43 ++--
 pyanaconda/localization.py                 |  11 +-
 pyanaconda/packaging/__init__.py           |   4 -
 pyanaconda/rescue.py                       |  10 +-
 pyanaconda/timezone.py                     |   9 +
 pyanaconda/ui/gui/__init__.py              |   2 +-
 pyanaconda/ui/gui/spokes/datetime_spoke.py |  10 +-
 pyanaconda/ui/gui/spokes/network.py        |   6 +-
 pyanaconda/ui/gui/spokes/welcome.py        |  36 ++-
 pyanaconda/ui/tui/spokes/askvnc.py         |   5 +-
 pyanaconda/ui/tui/spokes/shell_spoke.py    |   6 +-
 pyanaconda/users.py                        |  25 +-
 pyanaconda/vnc.py                          |  31 +--
 scripts/anaconda-yum                       |   1 +
 tests/pyanaconda_tests/iutil_test.py       | 209 +++++++++++++++
 utils/handle-sshpw                         |   2 -
 widgets/configure.ac                       |   2 +-
 widgets/src/BaseWindow.c                   |   6 +-
 widgets/src/BaseWindow.h                   |   2 +-
 widgets/src/StandaloneWindow.c             |   5 +-
 widgets/src/StandaloneWindow.h             |   2 +-
 28 files changed, 713 insertions(+), 415 deletions(-)

-- 
2.1.0



More information about the anaconda-patches mailing list