1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C8214431FD0
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 11:26:10 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id ks22cHkMpbJE for <notmuch@notmuchmail.org>;
\r
16 Thu, 22 Dec 2011 11:26:10 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 2F5E8431FB6 for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 11:26:10 -0800
\r
22 Received: by wgbds13 with SMTP id ds13so13454952wgb.2
\r
23 for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 11:26:07 -0800 (PST)
\r
24 Received: by 10.227.198.142 with SMTP id eo14mr11556285wbb.28.1324581967582;
\r
25 Thu, 22 Dec 2011 11:26:07 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id dd4sm25033396wib.1.2011.12.22.11.26.05
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Thu, 22 Dec 2011 11:26:06 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id 165AC9FBB6; Thu, 22 Dec 2011 19:26:04 +0000 (GMT)
\r
33 To: Austin Clements <amdragon@MIT.EDU>
\r
34 Subject: Re: [RFC][PATCH] notmuch: Workaround to allow ignoring non-void
\r
36 In-Reply-To: <20111222190305.GA324@mit.edu>
\r
37 References: <1324503532-5799-1-git-send-email-dme@dme.org>
\r
38 <20111222070345.GI10376@mit.edu>
\r
39 <cunfwgdvzpy.fsf@hotblack-desiato.hh.sledj.net>
\r
40 <20111222190305.GA324@mit.edu>
\r
41 User-Agent: Notmuch/0.10.2+107~ga2d0215 (http://notmuchmail.org)
\r
42 Emacs/24.0.92.1 (x86_64-pc-linux-gnu)
\r
43 From: David Edmondson <dme@dme.org>
\r
44 Date: Thu, 22 Dec 2011 19:25:59 +0000
\r
45 Message-ID: <cuny5u4v260.fsf@hotblack-desiato.hh.sledj.net>
\r
47 Content-Type: multipart/signed; boundary="=-=-=";
\r
48 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
49 Cc: notmuch@notmuchmail.org
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Thu, 22 Dec 2011 19:26:10 -0000
\r
65 Content-Type: text/plain
\r
66 Content-Transfer-Encoding: quoted-printable
\r
68 On Thu, 22 Dec 2011 14:03:05 -0500, Austin Clements <amdragon@MIT.EDU> wrot=
\r
70 > > In general I agree, but what would we do if writing an error message to
\r
73 > This was discussed on IRC, but calls to write(2) should never be bare.
\r
74 > I believe it's marked warn_unused_result not because libc is so
\r
75 > concerned with people checking for error returns (otherwise all sorts
\r
76 > of things would be marked warn_unused_result) but because even a
\r
77 > successful write can be a short write. Hence, not checking the result
\r
78 > is a bug, even if you don't care about errors.
\r
80 As I said, the principle is sound. What would do in this specific case?
\r
83 handle_sigint (unused (int sig))
\r
85 static char msg[] =3D "Stopping... \n";
\r
87 write(2, msg, sizeof(msg)-1);
\r
93 if (write(2, msg, sizeof(msg)-1) {
\r
94 /* Appease the compiler. */;
\r
98 Content-Type: application/pgp-signature
\r
100 -----BEGIN PGP SIGNATURE-----
\r
101 Version: GnuPG v1.4.11 (GNU/Linux)
\r
103 iEYEARECAAYFAk7zhEcACgkQaezQq/BJZRb5sgCeKPmw3UKPGWKTOOdvLd++mdzi
\r
104 awYAnRhOee2FLXQ5B/kilH9RWbxL/Nn6
\r
106 -----END PGP SIGNATURE-----
\r