stop stdin sender thread
| 4195 | |
| 4196 | // stop stdin sender thread |
| 4197 | void 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 |
| 4213 | void Query::stdin_sender(int fd) |