From d4097b577bb2f6a7f14c368030a38360ebea4eba Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Tue, 27 Sep 2022 21:54:36 +0800 Subject: [PATCH] tune --- src/ial/pcxvfbial.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ial/pcxvfbial.c b/src/ial/pcxvfbial.c index 52093000..0c0f7ca3 100644 --- a/src/ial/pcxvfbial.c +++ b/src/ial/pcxvfbial.c @@ -319,6 +319,19 @@ static void flush_rec (void) #endif } +static void close_rec (void) +{ +#ifdef WIN32 + /* TODO: */ +#else + if (record_fd >= 0) { + close(record_fd); + record_fd = -1; + } +#endif +} + + static void do_record(AUTO_IAL_INPUT_EVENT *event) { @@ -744,6 +757,7 @@ void TermPCXVFBInput (void) remove("/tmp/.pcxvfb_tmp"); } #endif + close_rec(); #endif /* WIN32 */ }