X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-tag.c;h=44fd61f6811db84d8e437f37247404140764556a;hp=292c5da3f824a222caceed290109cabed40e959c;hb=a9a9e374e2567caad8601d1781a3b0af8a3dde13;hpb=18947b95cd1668d1b98f7ea4196e97b050599f7d diff --git a/notmuch-tag.c b/notmuch-tag.c index 292c5da3..44fd61f6 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -26,7 +26,12 @@ static void handle_sigint (unused (int sig)) { static char msg[] = "Stopping... \n"; - (void) write(2, msg, sizeof(msg)-1); + + /* This write is "opportunistic", so it's okay to ignore the + * result. It is not required for correctness, and if it does + * fail or produce a short write, we want to get out of the signal + * handler as quickly as possible, not retry it. */ + IGNORE_RESULT (write (2, msg, sizeof(msg)-1)); interrupted = 1; }