]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-tag.c
emacs: Move the blank line from the bottom of the headers to the top of the body.
[notmuch] / notmuch-tag.c
index 537d5a4d1625d0747b1fe74f2045a150ee4b67d9..44fd61f6811db84d8e437f37247404140764556a 100644 (file)
@@ -26,7 +26,12 @@ static void
 handle_sigint (unused (int sig))
 {
     static char msg[] = "Stopping...         \n";
-    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;
 }