mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-13 12:52:08 -08:00
run-program: handle error' parameter value :output'
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This commit is contained in:
parent
73f60ca9d0
commit
dd2e3903bc
1 changed files with 12 additions and 2 deletions
|
|
@ -570,7 +570,14 @@ create_descriptor(cl_object stream, cl_object direction,
|
|||
}
|
||||
create_descriptor(input, @':input', &child_stdin, &parent_write);
|
||||
create_descriptor(output, @':output', &child_stdout, &parent_read);
|
||||
create_descriptor(error, @':output', &child_stderr, &parent_error);
|
||||
if (error == @':output')
|
||||
/* The child inherits a duplicate of its own output
|
||||
handle.*/
|
||||
DuplicateHandle(current, child_stdout, current,
|
||||
&child_stderr, 0, TRUE,
|
||||
DUPLICATE_SAME_ACCESS);
|
||||
else
|
||||
create_descriptor(error, @':output', &child_stderr, &parent_error);
|
||||
|
||||
add_external_process(the_env, process);
|
||||
#if 1
|
||||
|
|
@ -643,7 +650,10 @@ create_descriptor(cl_object stream, cl_object direction,
|
|||
|
||||
create_descriptor(input, @':input', &child_stdin, &parent_write);
|
||||
create_descriptor(output, @':output', &child_stdout, &parent_read);
|
||||
create_descriptor(error, @':output', &child_stderr, &parent_error);
|
||||
if (error == @':output')
|
||||
child_stderr = child_stdout;
|
||||
else
|
||||
create_descriptor(error, @':output', &child_stderr, &parent_error);
|
||||
|
||||
add_external_process(the_env, process);
|
||||
pipe(pipe_fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue