diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-19 16:16:51 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-19 16:16:51 +0000 |
commit | 3c272a2fbb4e7df73f2807e0e5028a7e29b1c407 (patch) | |
tree | 6aa97fce33c70ad1b35f4df6d96fc84f41596da8 /iutil.py | |
parent | 47d60238152e3e5992c689b9039ace121d6f8742 (diff) | |
download | anaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.tar.gz anaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.tar.xz anaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.zip |
execWithRedirect() takes filenames for stdin, etc
Diffstat (limited to 'iutil.py')
-rw-r--r-- | iutil.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -36,6 +36,13 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2, if (not childpid): if (root != '/'): isys.chroot (root) + if type(stdin) == type("a"): + stdin == os.open(stdin, os.O_RDONLY) + if type(stdout) == type("a"): + stdout == os.open(stdout, os.O_RDWR) + if type(stderr) == type("a"): + stderr = os.open(stderr, os.O_RDWR) + if stdin != 0: os.dup2(stdin, 0) os.close(stdin) |