From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 76A06429E27 for ; Tue, 6 Dec 2011 05:30:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q99FCLrZnJmV for ; Tue, 6 Dec 2011 05:30:17 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C21BF429E26 for ; Tue, 6 Dec 2011 05:30:16 -0800 (PST) Received: by bkbzu5 with SMTP id zu5so7365551bkb.26 for ; Tue, 06 Dec 2011 05:30:15 -0800 (PST) Received: by 10.216.182.193 with SMTP id o43mr573816wem.87.1323178215093; Tue, 06 Dec 2011 05:30:15 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id hn15sm14779493wib.22.2011.12.06.05.30.13 (version=SSLv3 cipher=OTHER); Tue, 06 Dec 2011 05:30:14 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: Re: [PATCH v3 1/2] cli: introduce the concept of user defined hooks In-Reply-To: References: <7fbe6befcf31881a9bca672f55b93501249a220c.1322859389.git.jani@nikula.org> User-Agent: Notmuch/0.10.1+59~ga1814f2 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Tue, 06 Dec 2011 15:30:11 +0200 Message-ID: <8739cxzv30.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2011 13:30:17 -0000 On Tue, 6 Dec 2011 15:22:37 +0200, Jani Nikula wrote: > + if (!WIFEXITED (status) || WEXITSTATUS (status)) { > + if (WEXITSTATUS (status)) { Grrh, the above should be "if (WIFEXITED (status))". Please review otherwise. Jani. > + fprintf (stderr, "Error: %s hook failed with status %d\n", > + hook, WEXITSTATUS (status)); > + } else if (WIFSIGNALED (status)) { > + fprintf (stderr, "Error: %s hook terminated with signal %d\n", > + hook, WTERMSIG (status)); > + } > + status = 1; > + }