author | Johannes Sixt <johannes.sixt@telecom.at> | |
Fri, 19 Oct 2007 19:47:58 +0000 (21:47 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Oct 2007 05:30:40 +0000 (01:30 -0400) | ||
commit | f3b33f1d220056243d3c1da154d3859410630189 | |
tree | 28970fae26a6dd7bfccd1472a7bed7ea9c07b436 | tree | snapshot |
parent | 477822c35dbf3d5f16fce1425638e761e60ede3d | commit | diff |
Have start_command() create a pipe to read the stderr of the child.
This adds another stanza that allocates a pipe that is connected to the
child's stderr and that the caller can read from. In order to request this
pipe, the caller sets cmd->err to -1.
The implementation is not exactly modeled after the stdout case: For stdout
the caller can supply an existing file descriptor, but this facility is
nowhere needed in the stderr case. Additionally, the caller is required to
close cmd->err.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This adds another stanza that allocates a pipe that is connected to the
child's stderr and that the caller can read from. In order to request this
pipe, the caller sets cmd->err to -1.
The implementation is not exactly modeled after the stdout case: For stdout
the caller can supply an existing file descriptor, but this facility is
nowhere needed in the stderr case. Additionally, the caller is required to
close cmd->err.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
run-command.c | diff | blob | history | |
run-command.h | diff | blob | history |