X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=lib%2Fprocess%2Fprocess.h;h=65fdba8d537beeb9e43efe9d3f3b08429d143530;hp=f75f1976c718df3970930c88be9bf1de2bde299f;hb=0ba871a497f156dd474a333889cd92eaab9b08dc;hpb=454f924bbcda7904c4348ef45c3d0d293768a48c diff --git a/lib/process/process.h b/lib/process/process.h index f75f197..65fdba8 100644 --- a/lib/process/process.h +++ b/lib/process/process.h @@ -23,6 +23,7 @@ struct process; struct procset; +struct process_info; typedef void (*process_exit_cb)(struct process *); @@ -34,6 +35,8 @@ struct process { bool add_stderr; process_exit_cb exit_cb; void *data; + waiter_cb stdout_cb; + void *stdout_data; /* runtime data */ pid_t pid; @@ -79,4 +82,8 @@ void process_stop_async(struct process *process); * exit status */ bool process_exit_ok(struct process *process); +/* Functions to assist callers using a custom stdout callback */ +struct process *procinfo_get_process(struct process_info *procinfo); +int process_stdout_custom(struct process_info *procinfo, char **line); + #endif /* PROCESS_H */