mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Don't close the kqueue manually on shutdown on Windows
This commit is contained in:
parent
a757ba12f3
commit
4cb77c1743
1 changed files with 9 additions and 0 deletions
|
@ -89,8 +89,17 @@ Manager::~Manager()
|
||||||
|
|
||||||
pkt_dumpers.clear();
|
pkt_dumpers.clear();
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
// There's a bug here with builds on Windows that causes an assertion with debug builds
|
||||||
|
// related to libkqueue returning a zero for the file descriptor. The assert happens
|
||||||
|
// because something else has already closed FD zero by the time we get here, and Windows
|
||||||
|
// doesn't like that very much. We only do this close when shutting down, so it should
|
||||||
|
// be fine to just skip it.
|
||||||
|
//
|
||||||
|
// See https://github.com/mheily/libkqueue/issues/151 for more details.
|
||||||
if ( event_queue != -1 )
|
if ( event_queue != -1 )
|
||||||
close(event_queue);
|
close(event_queue);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::InitPostScript()
|
void Manager::InitPostScript()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue