]> git.ozlabs.org Git - petitboot/commit
lib/process: Add add_stderr flag to process module
authorJeremy Kerr <jk@ozlabs.org>
Tue, 14 Jan 2014 07:44:10 +0000 (15:44 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 14 Jan 2014 07:55:21 +0000 (15:55 +0800)
commit33527e065d9506e05f61c020a473544123c0601b
treee76ef3df4907151438406013a011e69808a8c2c0
parent4153ab54b5933fc315ad896e264f74571a494c90
lib/process: Add add_stderr flag to process module

For some process execution functions, we'd like to capture stderr as
well as stdout. Currently, we unconditionally redirect subprocess stderr
to the petitboot log file.

This change adds an add_stderr flag to struct process, which indicates
to the process library that we want stderr as well as stdout. If this is
specified, the subprocess' stderr is captured to stdout_buf.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/process/process.c
lib/process/process.h
test/lib/Makefile.am
test/lib/test-process-stderr-stdout.c [new file with mode: 0644]
test/lib/test-process-stderr.c [new file with mode: 0644]