diff options
author | Niels de Vos <ndevos@redhat.com> | 2014-04-29 13:54:53 -0700 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2014-06-08 00:28:29 -0700 |
commit | 47732e9742ae1f898f161b4244e7faed74c98756 (patch) | |
tree | b178752c76fbe0d740e28d3ba9bf235df9d52b78 /rpc | |
parent | cf8029c55f3efc80b17b2ce3442864643e2fe917 (diff) |
logging: use duplicate stderr, instead of re-opening
The special filename "-" is supposed to log to stderr. Instead of
trying to explictly open "/dev/stderr" again (which may not be possible
as permissions might have changed by then), dup the stderr and use
the copy.
It is not a good idea to use @stderr global variable directly, as
ctx->log.logfile is fclose()d in glfs_fini() (was fixed in
http://review.gluster.org/6452)
Cherry picked from commit 15ea78fffd63756fecf2f15887d3cad6a13d2a34:
> BUG: 1088589
> Signed-off-by: Anand Avati <avati@redhat.com>
> Reviewed-on: http://review.gluster.org/7607
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Change-Id: Ia6c538fe363905588dcf4fc4783804073956a586
BUG: 1103413
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7938
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Diffstat (limited to 'rpc')
0 files changed, 0 insertions, 0 deletions