Re: [PATCH v3 1/2] cli: introduce the concept of user defined hooks

Subject: Re: [PATCH v3 1/2] cli: introduce the concept of user defined hooks

Date: Tue, 06 Dec 2011 15:30:11 +0200

To: notmuch@notmuchmail.org

Cc:

From: Jani Nikula


On Tue,  6 Dec 2011 15:22:37 +0200, Jani Nikula <jani@nikula.org> 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;
> +    }

Thread: