Memset sigaction before using it (#24933)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/24945/head
congqixia 2023-06-16 14:08:40 +08:00 committed by GitHub
parent ce5cb3c0c5
commit cbfbc4e63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -95,6 +95,7 @@ MinioChunkManager::InitSDKAPI(RemoteStorageType type) {
if (initCount == 0) { if (initCount == 0) {
// sdk_options_.httpOptions.installSigPipeHandler = true; // sdk_options_.httpOptions.installSigPipeHandler = true;
struct sigaction psa; struct sigaction psa;
memset(&psa, 0, sizeof psa);
psa.sa_handler = SwallowHandler; psa.sa_handler = SwallowHandler;
psa.sa_flags = psa.sa_flags | SA_ONSTACK; psa.sa_flags = psa.sa_flags | SA_ONSTACK;
sigaction(SIGPIPE, &psa, 0); sigaction(SIGPIPE, &psa, 0);