Skip to content

Commit

Permalink
Merge pull request #1 from slimta/master
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
breno-dsuite committed Jul 20, 2019
2 parents 095c1ec + bcc5741 commit 309659b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dist/
.coverage
nosetests.xml
coverage.xml
.mypy_cache/
examples/cert.pem
*.pyc
*.pyo
Expand Down
6 changes: 3 additions & 3 deletions slimta/util/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def redirect_stdio(stdout=None, stderr=None, stdin=None):
# Redirect all standard I/O to /dev/null.
sys.stdout.flush()
sys.stderr.flush()
si = open(stdin or nullfile, 'r')
so = open(stdout or nullfile, 'a+')
se = open(stderr or nullfile, 'a+', 0)
si = open(stdin or nullfile, 'rb')
so = open(stdout or nullfile, 'ab+')
se = open(stderr or nullfile, 'ab+', 0)
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
Expand Down

0 comments on commit 309659b

Please sign in to comment.