MCPcopy Create free account
hub / github.com/Genivia/ugrep / stop_stdin

Method stop_stdin

src/query.cpp:4197–4210  ·  view source on GitHub ↗

stop stdin sender thread

Source from the content-addressed store, hash-verified

4195
4196// stop stdin sender thread
4197void Query::stop_stdin()
4198{
4199 if (flag_stdin)
4200 {
4201 // close the stdin pipe when open
4202 if (Static::source != stdin && Static::source != NULL)
4203 fclose(Static::source); // close source but don't reset to NULL, source is used by the search thread
4204
4205 // join the stdin_sender
4206 stdin_stop = true;
4207 if (stdin_thread_.joinable())
4208 stdin_thread_.join();
4209 }
4210}
4211
4212// push standard input down the specified pipe fd
4213void Query::stdin_sender(int fd)

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected