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

2011-12-06 Thread Jani Nikula
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

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

2011-12-06 Thread Jani Nikula
Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under the new notmuch hooks directory, /.notmuch/hooks. No hooks are introduced here, but adding support for a hook is now a simple matter of calling the new notmuch_run_hook() function at an

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

2011-12-06 Thread Jani Nikula
Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under the new notmuch hooks directory, database-path/.notmuch/hooks. No hooks are introduced here, but adding support for a hook is now a simple matter of calling the new notmuch_run_hook()

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

2011-12-06 Thread Jani Nikula
On Tue, 6 Dec 2011 15:22:37 +0200, Jani Nikula j...@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