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>
Fri, 20 May 2016 20:40:02 +0000 (16:40 -0400)
commitb7d17fdfe9a0f52c272b4d2640a8e9b4b396ac1a
treed97d582b0939e3482b76e27e33da67b7ec9d42ed
parent6a381a6ef90d2068731064cc42d5f6eeb6483c3f
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.025122 seconds and 4 git commands to generate.