/a.patch Secret
Created
February 2, 2021 21:17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/staprun/staprun.c b/staprun/staprun.c | |
index 523eb861e..794700a07 100644 | |
--- a/staprun/staprun.c | |
+++ b/staprun/staprun.c | |
@@ -242,7 +242,11 @@ static void remove_all_modules(void) | |
static int remove_module(const char *name, int verb) | |
{ | |
- int ret; | |
+ int i, ret; | |
+ enum { | |
+ MAX_EINTR_TRIES = 5 | |
+ }; | |
+ | |
dbug(2, "%s\n", name); | |
#ifdef PR_SET_NAME | |
@@ -271,7 +275,13 @@ static int remove_module(const char *name, int verb) | |
dbug(2, "removing module %s\n", name); | |
PROBE1(staprun, remove__module, name); | |
- ret = delete_module (name, O_NONBLOCK); | |
+ | |
+ for (i = 0; i < MAX_EINTR_TRIES; i++) { | |
+ ret = delete_module (name, O_NONBLOCK); | |
+ if (ret == 0 || errno != EINTR) | |
+ break; | |
+ } | |
+ | |
if (ret != 0) { | |
/* XXX: maybe we should just accept this, with a | |
diagnostic, but without an error. Might it be |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment