diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-12-03 09:41:23 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-12-03 18:44:06 +0000 |
commit | c9eab8203f6df3ec9d8bd82ab063851682f50b3a (patch) | |
tree | acf9a16b719ae90b51f63a20228e3bec65026e89 /epan/maxmind_db.c | |
parent | 46ee43aae2164048c8f0d7ee5d6ab22ea573d21d (diff) |
maxminddb: Expand a comment.
Change-Id: Iac0d158ccc56c40c87ccc8399a8a5b16af768e12
Reviewed-on: https://code.wireshark.org/review/30901
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/maxmind_db.c')
-rw-r--r-- | epan/maxmind_db.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/maxmind_db.c b/epan/maxmind_db.c index 9170cb23a1..b9aa3d8d69 100644 --- a/epan/maxmind_db.c +++ b/epan/maxmind_db.c @@ -193,10 +193,16 @@ static ssize_t mmdbr_pipe_read_one(char *ch_p) { // We need to read a series of lines from mmdbresolve's stdout. Trying to // use fgets is problematic because it blocks on Windows blocks. Doing so // in a thread is even worse since it locks the I/O stream and if the main -// thread calls fclose while fgets is blocking, it will block as well. +// thread calls fclose while fgets is blocking, it will block as well. The +// same happens for plain close+read. // // Read our input one character at a time and only after we've ensured -// that data is available. +// that data is available. If this is too inefficient we could try one +// of the following: +// - Use overlapped I/O, which implies adding ws_pipe_set_nonblock and +// ws_pipe_read_nonblock routines. +// - Stash our worker thread handles on Windows and call CancelSynchronousIo +// before shutting down our threads. #define MAX_MMDB_LINE_LEN 2000 static gpointer read_mmdbr_stdout_worker(gpointer data _U_) { |