1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Better signals interface

This avoids some CPP and accidentally using Unix stuff in client code.
This commit is contained in:
John Ericson 2024-04-04 12:25:01 -04:00
parent 9d03c2b08b
commit 50f621b241
11 changed files with 134 additions and 51 deletions

View file

@ -348,7 +348,7 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
{
auto act = (Activity *) payload;
act->result(resFetchStatus, trim(std::string_view(str, len)));
return _isInterrupted ? -1 : 0;
return getInterrupted() ? -1 : 0;
}
static int transferProgressCallback(const git_indexer_progress * stats, void * payload)
@ -361,7 +361,7 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
stats->indexed_deltas,
stats->total_deltas,
stats->received_bytes / (1024.0 * 1024.0)));
return _isInterrupted ? -1 : 0;
return getInterrupted() ? -1 : 0;
}
void fetch(