mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-18 17:27:11 +00:00
make bulk export commands gracefully exit on SIGPIPE (for example, if piped to head)
This commit is contained in:
@ -34,6 +34,8 @@ void cmd_scan(const std::vector<std::string> &subArgs) {
|
||||
|
||||
uint64_t numEvents = 0;
|
||||
|
||||
exitOnSigPipe();
|
||||
|
||||
while (1) {
|
||||
bool complete = query.process(txn, [&](const auto &sub, uint64_t levId, std::string_view eventPayload){
|
||||
if (count) numEvents++;
|
||||
|
Reference in New Issue
Block a user