diff options
author | 2010-03-11 16:16:49 +0800 | |
---|---|---|
committer | 2010-03-12 13:05:37 +0800 | |
commit | e1d4e193bd5b4957e179dc8865675b3f7a15e052 (patch) | |
tree | 89f785c5c04bd88732f3fa352e708f358a92cfc8 | |
parent | 6ab07eb0117d1fcbe670934d04ea801819337d4d (diff) |
Check stdout a tty before flushing.
-rwxr-xr-x | examples/data/scripts/uzbl-cookie-daemon | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/data/scripts/uzbl-cookie-daemon b/examples/data/scripts/uzbl-cookie-daemon index fde8b8e..ed88de4 100755 --- a/examples/data/scripts/uzbl-cookie-daemon +++ b/examples/data/scripts/uzbl-cookie-daemon @@ -269,8 +269,9 @@ def daemonize(): sys.stderr.write("fork #2 failed") sys.exit(1) - sys.stdout.flush() - sys.stderr.flush() + if sys.stdout.isatty(): + sys.stdout.flush() + sys.stderr.flush() devnull = '/dev/null' stdin = file(devnull, 'r') |