Fix: bad file descriptors on close after rotation error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 May 2016 18:04:10 +0000 (14:04 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 05:38:34 +0000 (01:38 -0400)
commit38119c1a313ba870529b1bb1ea0f842a6f8c5572
tree5e5bf35fec1ede1e577d74e7ada88937b2859f22
parent915af778b0118c6789a32e77368b8d14c5f8eb8c
Fix: bad file descriptors on close after rotation error

Ensure we don't try to close output stream file descriptors twice when a
trace file rotation error occurs (once at tracefile rotation, once when
closing the stream). Set the fd value to -1 after the first close to
ensure we don't try to close it again.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/utils.c
This page took 0.025353 seconds and 4 git commands to generate.