def chugid_and_umask(runas, umask):
    if runas is not None:
        chugid(runas)
    if umask is not None:
        os.umask(umask)
Helper method for for subprocess.Popen to initialise uid/gid and umask
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/chugid_and_umask