I'm still working on the API for running of chain of events because we have to
implement this functionality in report-cli. I proposed an implementation
employing threads few weeks ago and the implementation have been reject. (I
have to admit that the proposed implementation was a little bit complicated.)
Now, I am trying to achieve my goals in much simpler way.
This patch set doesn't introduces the chain API yet, it only merges duplicate
implementations of running of event commands. We have one implementation for
the command line reporter and another one for the GUI report. There are only
few new lines but lot of changes. The main improvement is handling of
nonblocking reads form child's stdout and better maintainability.
I want to know your opinion about this patch set before I continue.
Jakub Filak (5):
trac#622 : event command message prefix lengths computed at
initialization
trac#622 : split run_event_on_dir_name() in to two functions
trac#622 : use callbacks in run_event_command_on_dir_name()
trac#622 : expose run_event_command_on_dir() and allow user to set
O_NONBLOCK read to child's stdout
trac#622 : report-gtk uses run_event_command_on_dir_name()
src/gui-wizard-gtk/wizard.c | 311 +++++++++++++++++--------------------------
src/include/run_event.h | 106 +++++++++++++++
src/lib/run_event.c | 227 ++++++++++++++++++++-----------
3 files changed, 378 insertions(+), 266 deletions(-)
--
1.7.10.4